Closed Bug 1577161 Opened 7 years ago Closed 6 years ago

Gecko Profiler shouldn't include data-urls in profile strings (for perf reasons)

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When profiling Bug 1576999, we spend an enormous amount of time in the profiler itself cloning strings for data-url filenames.

We can either cap filename lengths here or replace all filenames that start with 'data:' with a placeholder.

See Also: → 1577273

When profiling scripts with large numbers of dynamic Functions and
complex URLs the profiler overhead can severely skew results. This puts
a cap on the filename length we send to profiler to reduce the impact of
this when using data urls.

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e767d6cba5a Limit length of filename saved for profiler. r=jandem
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1579038
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla71 → ---

The issue is that char_traits::find(..) requires length to cover valid memory rather than stopping at first match. On Windows, the SIMD implementation will read beyond null-pointer and touch an unmapped page.

Maybe you can use js_strchr_limit?

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:tcampbell, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(tcampbell)
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b9c45b97423 Limit length of filename saved for profiler. r=jandem
Status: REOPENED → RESOLVED
Closed: 7 years ago → 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Flags: needinfo?(tcampbell)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: