Commit Graph

775 Commits

Author SHA1 Message Date
Nathan Froyd
a9fb00a2f6 Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8
Quantum DOM is no longer a priority, and the extra code it introduces to
several places block useful refactorings.
2019-01-22 20:16:56 -05:00
Markus Stange
8724feaa90 Bug 1521608 - Tweak MOZ_PROFILER_HELP log message. r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D17160

--HG--
extra : moz-landing-system : lando
2019-01-22 11:35:46 +00:00
Cosmin Sabou
7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Greg Tatum
7042c8f1c3 Bug 1520526 - Add categories to all profiler markers; r=mstange
This commit adds categories to all markers. This way the profiler's
marker categories and frame label categories agree. There are a few
duplicate category properties on some of the marker payloads, but
this could be cleaned up in a follow-up if needed.

Differential Revision: https://phabricator.services.mozilla.com/D16864

--HG--
extra : moz-landing-system : lando
2019-01-18 15:40:15 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Randell Jesup
f75205467e Bug 1518030: add keyword to mirror LOG messages into Profiler LogMarkers r=mstange,froyd 2019-01-15 12:49:03 -05:00
Randell Jesup
a3b990d95a Bug 1508837: Add TextMarker payloads for simple Profiler Markers r=mstange 2018-12-14 16:01:19 -05:00
Jed Davis
3fe8a630c1 Bug 1487287 - Set profiler env vars in child processes without side-effecting the parent process. r=mstange
We can directly set environment variables for the child process on
all platforms now, instead of changing the parent's environment and
inheriting the changes.  This simplifies memory management, but more
importantly it's necessary for thread safety to allow launching
processes from a thread pool.

Depends on D8944

Differential Revision: https://phabricator.services.mozilla.com/D8945

--HG--
extra : moz-landing-system : lando
2019-01-08 23:53:36 +00:00
Mike Hommey
6f3a0485b0 Bug 1513088 - Use MozStackWalk in the profiler for aarch64 Windows. r=froydnj
Depends on D14929

Differential Revision: https://phabricator.services.mozilla.com/D14930

--HG--
extra : moz-landing-system : lando
2018-12-20 05:03:05 +00:00
Denis Palmeiro
1d2e62c07a Bug 1497016 - Add an API to extract tracelogger data and use this within the gecko profiler r=mstange,djvj
Add a new class to extract tracelogger data using chunked buffers and use this to write the data out to the profiler JSON output.  Copying the data in chunks lets us minimize our memory overhead when writing out to the profiler so a large array of millions of elements does not need to be allocated ahead of time.

Differential Revision: https://phabricator.services.mozilla.com/D11791

--HG--
extra : moz-landing-system : lando
2018-12-04 21:43:38 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari
490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13371

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Andreea Pavel
74cd2bf73e Backed out 8 changesets (bug 1446161, bug 1487287, bug 1488993, bug 1474991, bug 1496608) for very frequent automation.py crashes on a CLOSED TREE
Backed out changeset 8b1f88d7bfeb (bug 1487287)
Backed out changeset 8fa5e81ad801 (bug 1487287)
Backed out changeset 7a480161fa0f (bug 1474991)
Backed out changeset 80116391b7fe (bug 1446161)
Backed out changeset 1bdf64b29121 (bug 1446161)
Backed out changeset 37bf52f0e9cf (bug 1446161)
Backed out changeset 8ede2ebe6b7a (bug 1496608)
Backed out changeset cea43bc88c7a (bug 1488993)
2018-11-27 08:53:18 +02:00
Jed Davis
8782927375 Bug 1487287 - Set profiler env vars in child processes without side-effecting the parent process. r=mstange
We can directly set environment variables for the child process on
all platforms now, instead of changing the parent's environment and
inheriting the changes.  This simplifies memory management, but more
importantly it's necessary for thread safety to allow launching
processes from a thread pool.

Depends on D8944

Differential Revision: https://phabricator.services.mozilla.com/D8945

--HG--
extra : moz-landing-system : lando
2018-11-22 00:06:20 +00:00
Nazım Can Altınova
52910a3163 Bug 1476775 - Part 1: Discard samples that are older than given duration r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D6267

--HG--
extra : moz-landing-system : lando
2018-11-21 14:13:15 +00:00
Gerald Squelart
bd8d839a26 Bug 1435091 - p3. profiler_thread_is_being_profiled() - r=mstange
profiler_thread_is_being_profiled() checks if the profiler is active (quick
inline atomic check) and if the current thread is being profiled (function call
doing a TLS-atomic check).

This may be used instead of profiler_is_active() for thread-specific recordings
(e.g.: markers).

Differential Revision: https://phabricator.services.mozilla.com/D11307

--HG--
extra : moz-landing-system : lando
2018-11-19 17:41:09 +00:00
Gerald Squelart
c5055b88e3 Bug 1435091 - p2. Don't record markers when current thread is not actively being profiled - r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D11306

--HG--
extra : moz-landing-system : lando
2018-11-19 17:40:51 +00:00
Gerald Squelart
5e9017b540 Bug 1435091 - p1. RacyRegisteredThread::IsBeingProfiled() - r=mstange,njn
RacyRegisteredThread::IsBeingProfiled() is only true when the thread is being
actively profiled, i.e., it is in the selected-thread list and the profiler is
active (modulo racy accesses when starting/stopping the profiler, i.e., don't
rely on it if accurate concurrency is required).

Differential Revision: https://phabricator.services.mozilla.com/D11304

--HG--
extra : moz-landing-system : lando
2018-11-21 04:57:35 +00:00
Ted Campbell
87e6a3bb5d Bug 1508180 - Use uppercase high-order macro names in profiler. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D12235

--HG--
extra : moz-landing-system : lando
2018-11-19 17:41:27 +00:00
arthur.iakab
c0b26c4076 Merge inbound to mozilla-central a=merge 2018-11-15 11:54:15 +02:00
Markus Stange
4945a7b3d2 Bug 1500467 - Add RELEVANT_FOR_JS flag and update profile format with an extra relevantForJS column in the stack table. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D9300

--HG--
extra : moz-landing-system : lando
2018-11-14 18:52:29 +00:00
Sylvestre Ledru
2b4847d320 Bug 1506538 - Remove +x permissions on C++ source files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D11609

--HG--
extra : moz-landing-system : lando
2018-11-13 15:32:08 +00:00
Randell Jesup
8773e64196 Bug 1505948: Add cache info to network profiler markers r=mstange,nwgh 2018-11-14 15:54:22 -05:00
Ciure Andrei
92c9686945 Backed out changeset e157b95e9b5e (bug 1505948) for HttpChannelChild.cpp build bustages CLOSED TREE 2018-11-14 23:41:01 +02:00
Randell Jesup
286dfeada3 Bug 1505948: Add cache info to network profiler markers r=mstange,nwgh 2018-11-14 15:54:22 -05:00
Gabriele Svelto
60546f7ebb Bug 1502424 - Accommodate for larger ELF identifiers to prevent dynamic allocations r=ted
Differential Revision: https://phabricator.services.mozilla.com/D11027

--HG--
extra : moz-landing-system : lando
2018-11-06 14:14:02 +00:00
Gerald Squelart
2ce555aca7 Bug 1465924 - Add profile.threads[i].processName which contains "Main Process", or the content process's name like "WebExtensions" - r=gregtatum
This field is in addition to the existing process type fields we already have:
- profile.threads[i].processType contains the string for the GeckoProcessType.
- profile.threads[i].name contains the ThreadInfo name.

Differential Revision: https://phabricator.services.mozilla.com/D10549

--HG--
extra : moz-landing-system : lando
2018-11-02 21:52:32 +00:00
Nazım Can Altınova
251628f687 Bug 1417976 - Part 3: Stream the DocShell list and DocShellId marker data to profile data r=mstange
MozReview-Commit-ID: G2s5H8i4p6E

Depends on D4915

Differential Revision: https://phabricator.services.mozilla.com/D4916

--HG--
extra : moz-landing-system : lando
2018-11-06 21:46:46 +00:00
Nazım Can Altınova
f967885c60 Bug 1417976 - Part 2: Include DocShell IDs to marker payloads r=mstange
MozReview-Commit-ID: AML1ESUnFlu

Depends on D4914

Differential Revision: https://phabricator.services.mozilla.com/D4915

--HG--
extra : moz-landing-system : lando
2018-11-06 21:45:50 +00:00
Nazım Can Altınova
aaba02d9ee Bug 1417976 - Part 1: Store the information of DocShells in CorePS r=mstange,bzbarsky
Added a mechanism to register and unregister the DocShells from the CorePS depending
on the state of the profiler. Registering mechanism is straightforward. During
unregistration, if profiler is not active, we remove the DocShell information
immediately. If profiler is active, we don't remove and we keep the profiler buffer
position at that moment. During another DocShell registration we Discard the
unregistered DocShells. If the profiler buffer position is greater than the position
when we captured during unregistration, we delete the DocShell since that means there
can't be any markers associated to this DocShell anymore.

MozReview-Commit-ID: IVuKQ6drvkR

Differential Revision: https://phabricator.services.mozilla.com/D4914

--HG--
extra : moz-landing-system : lando
2018-11-06 21:45:07 +00:00
Markus Stange
75c251de85 Bug 1499507 - Add ProfilingStackFrame flags for to choose the string template that is used to combine the label with the dynamic string. r=njn
These flags will be used by WebIDL APIs in an upcoming patch.

Depends on D9199

Differential Revision: https://phabricator.services.mozilla.com/D9203

--HG--
extra : moz-landing-system : lando
2018-11-06 04:33:07 +00:00
Markus Stange
e6c22c99ad Bug 1499507 - Convert the ProfilingStackFrame kind into a set of flags. r=njn
This makes it easier to add more flags.

Depends on D9197

Differential Revision: https://phabricator.services.mozilla.com/D9199

--HG--
extra : moz-landing-system : lando
2018-11-06 04:32:29 +00:00
Markus Stange
974ec0a838 Bug 1499507 - Use AppendPrintf to concatenate the label with the dynamic string. r=njn
This code is run during JSON serialization so performance is not a big concern.

Depends on D9195

Differential Revision: https://phabricator.services.mozilla.com/D9197

--HG--
extra : moz-landing-system : lando
2018-11-06 04:31:45 +00:00
Markus Stange
ab700f9fc0 Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

Differential Revision: https://phabricator.services.mozilla.com/D9195

--HG--
extra : moz-landing-system : lando
2018-11-06 04:31:02 +00:00
Brindusan Cristian
ab89743379 Backed out 9 changesets (bug 1499507) for build bustages on /profiler/core/platform.cpp. CLOSED TREE
Backed out changeset 4c79a5557d7b (bug 1499507)
Backed out changeset 35d05a53e0a9 (bug 1499507)
Backed out changeset 9254e6c721b3 (bug 1499507)
Backed out changeset cf40b044af3f (bug 1499507)
Backed out changeset 76dd85b9aaf7 (bug 1499507)
Backed out changeset 6256446f16c4 (bug 1499507)
Backed out changeset 41cede6bc7d2 (bug 1499507)
Backed out changeset 30476b824eb4 (bug 1499507)
Backed out changeset 24a9494155fe (bug 1499507)
2018-11-05 23:24:49 +02:00
Markus Stange
30477de777 Bug 1499507 - Add ProfilingStackFrame flags for to choose the string template that is used to combine the label with the dynamic string. r=njn
These flags will be used by WebIDL APIs in an upcoming patch.

Depends on D9199

Differential Revision: https://phabricator.services.mozilla.com/D9203

--HG--
extra : moz-landing-system : lando
2018-11-05 20:56:50 +00:00
Markus Stange
9bed7de565 Bug 1499507 - Convert the ProfilingStackFrame kind into a set of flags. r=njn
This makes it easier to add more flags.

Depends on D9197

Differential Revision: https://phabricator.services.mozilla.com/D9199

--HG--
extra : moz-landing-system : lando
2018-11-05 20:56:17 +00:00
Markus Stange
e8536c78ec Bug 1499507 - Use AppendPrintf to concatenate the label with the dynamic string. r=njn
This code is run during JSON serialization so performance is not a big concern.

Depends on D9195

Differential Revision: https://phabricator.services.mozilla.com/D9197

--HG--
extra : moz-landing-system : lando
2018-11-05 20:55:38 +00:00
Markus Stange
4c59aa793c Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

Differential Revision: https://phabricator.services.mozilla.com/D9195

--HG--
extra : moz-landing-system : lando
2018-11-05 20:55:10 +00:00
Narcis Beleuzu
2c6edfdde8 Backed out 9 changesets (bug 1499507) for bustages on ProfileBuffer.cpp . CLOSED TREE
Backed out changeset 541186291b88 (bug 1499507)
Backed out changeset 8a3f4acbad3b (bug 1499507)
Backed out changeset f427afc392b0 (bug 1499507)
Backed out changeset 58dc19fb2b76 (bug 1499507)
Backed out changeset 9225e9aea377 (bug 1499507)
Backed out changeset ca23a517da63 (bug 1499507)
Backed out changeset 16d6c90333de (bug 1499507)
Backed out changeset bc134fe1722a (bug 1499507)
Backed out changeset 4a9c9a91182c (bug 1499507)
2018-11-05 21:48:11 +02:00
Markus Stange
eeb95b0846 Bug 1499507 - Add ProfilingStackFrame flags for to choose the string template that is used to combine the label with the dynamic string. r=njn
These flags will be used by WebIDL APIs in an upcoming patch.

Depends on D9199

Differential Revision: https://phabricator.services.mozilla.com/D9203

--HG--
extra : moz-landing-system : lando
2018-11-05 19:10:12 +00:00
Markus Stange
d026ceb9e3 Bug 1499507 - Convert the ProfilingStackFrame kind into a set of flags. r=njn
This makes it easier to add more flags.

Depends on D9197

Differential Revision: https://phabricator.services.mozilla.com/D9199

--HG--
extra : moz-landing-system : lando
2018-11-05 19:09:21 +00:00
Markus Stange
d905cc3e62 Bug 1499507 - Use AppendPrintf to concatenate the label with the dynamic string. r=njn
This code is run during JSON serialization so performance is not a big concern.

Depends on D9195

Differential Revision: https://phabricator.services.mozilla.com/D9197

--HG--
extra : moz-landing-system : lando
2018-11-05 19:08:49 +00:00
Markus Stange
000dc83f31 Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx

Depends on D9193

Differential Revision: https://phabricator.services.mozilla.com/D9195

--HG--
extra : moz-landing-system : lando
2018-11-05 19:07:45 +00:00
Tom Ritter
055159557a Bug 1502686 - When fuzzyfox is enabled, first put it into an initializing state before telling TimeStamp is it enabled r=baku
This prevents a race condition where the JS Engine would get the Fuzzed Time
before the dispatched job was run, and the time was zero and triggered an assertion.

This patch also includes more verbose logging for additional debugging.
2018-11-02 11:44:14 -05:00
arthur.iakab
f4c1145722 Backed out changeset 582dbb4c3bf5 (bug 1502686)for failing gtests on Contents/Resources/gmp-clearkey "CLOSED TREE" 2018-11-02 22:18:38 +02:00
Tom Ritter
fff8b7bb29 Bug 1502686 - When fuzzyfox is enabled, first put it into an initializing state before telling TimeStamp is it enabled r=baku
This prevents a race condition where the JS Engine would get the Fuzzed Time
before the dispatched job was run, and the time was zero and triggered an assertion.

This patch also includes more verbose logging for additional debugging.
2018-11-02 11:44:14 -05:00
Nazım Can Altınova
b307cbb99b Bug 1349607 - Remove mVsyncTimestamp from the VsyncMarkerPayload r=mstange
Removing this field since we already have start/end time for each marker payloads.
Also we are assigning the same timestamp to them. We don't need to unnecessarily
duplicate the information here.

Differential Revision: https://phabricator.services.mozilla.com/D8551

--HG--
extra : moz-landing-system : lando
2018-11-01 13:56:18 +00:00
Nazım Can Altınova
9bf5cb96b8 Backed out changeset ef82ba4b7f22 (Bug 1476757) r=mstange 2018-10-30 15:14:02 +01:00
Nazım Can Altınova
9832e96686 Backed out changeset 3428510869a9 (Bug 1476757) r=mstange 2018-10-30 15:12:30 +01:00