Граф коммитов

146 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack a1e18da1b1 Bug 1573090 - Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald
Whereas previously MozDescribeCodeAddress would have handled demangling,
we need to explicitly do that from our new GetFunction method.  The string we
generate is now more useful for the profiler to merge -- having dropped the
address in the previous patch, and the file & line number and library in this
patch.

While we're at it, try to demangle Rust symbols too.

Ideally we'd add Rust symbol handling to DemangleSymbol in
StackWalk.cpp, but that lives in mozglue, which currently cannot have
any Rust crate dependencies.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 05:45:16 +00:00
Cameron McCormack 4988c81b4c Bug 1573090 - Part 1: Use a CodeAddressService when pre-symbolicating Gecko profiles. r=gerald
This speeds up pre-symbolication substantially.

We add a new class ProfilerCodeAddressService as the next patch will add
some functionality.

This also changes the format of the string we generate when
symbolicating, by dropping the leading address and space if we do have a
string that MozDescribeCodeAddress gave us.  (We'll change this format
again in the next patch.)

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

--HG--
extra : moz-landing-system : lando
2019-08-23 05:45:14 +00:00
Gerald Squelart 74a83dc93f Bug 1575158 - BlocksRingBufferGeckoExtensions.h - r=gregtatum
Some marker payloads rely on JS and XPCOM objects (e.g., nsCString), so we need
to (de)serialize these.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 22:52:34 +00:00
Gerald Squelart 56631f2ced Bug 1549232 - Only use profiler_current_{process,thread}_id in the Gecko Profiler instead of alternatives - r=mstange
There were many inconsistent ways to retrieve process/thread ids in the
profiler. Now we have only one platform-dependent implementation each:
profiler_current_process_id() and profiler_current_thread_id().

Note that this removes the need for the small `class Thread` in platform.h.
However memory_hooks.cpp still needs to be built non-unified, because of the
required order of #includes (replace_malloc.h before replace_malloc_bridge.h),
which could be disturbed by other cpp's.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 18:26:15 +00:00
Nazım Can Altınova 69592e8ad5 Bug 1543632 - Part 3: Add some tests for profile page information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D27679

--HG--
extra : moz-landing-system : lando
2019-04-30 09:50:24 +00:00
Nazım Can Altınova bf5ead8db6 Bug 1543632 - Part 1: Move xpcshell tests under tools/profiler/tests to their own dir r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D27676

--HG--
rename : tools/profiler/tests/head_profiler.js => tools/profiler/tests/xpcshell/head_profiler.js
rename : tools/profiler/tests/test_asm.js => tools/profiler/tests/xpcshell/test_asm.js
rename : tools/profiler/tests/test_enterjit_osr.js => tools/profiler/tests/xpcshell/test_enterjit_osr.js
rename : tools/profiler/tests/test_enterjit_osr_disabling.js => tools/profiler/tests/xpcshell/test_enterjit_osr_disabling.js
rename : tools/profiler/tests/test_enterjit_osr_enabling.js => tools/profiler/tests/xpcshell/test_enterjit_osr_enabling.js
rename : tools/profiler/tests/test_feature_mainthreadio.js => tools/profiler/tests/xpcshell/test_feature_mainthreadio.js
rename : tools/profiler/tests/test_get_features.js => tools/profiler/tests/xpcshell/test_get_features.js
rename : tools/profiler/tests/test_pause.js => tools/profiler/tests/xpcshell/test_pause.js
rename : tools/profiler/tests/test_run.js => tools/profiler/tests/xpcshell/test_run.js
rename : tools/profiler/tests/test_shared_library.js => tools/profiler/tests/xpcshell/test_shared_library.js
rename : tools/profiler/tests/test_start.js => tools/profiler/tests/xpcshell/test_start.js
rename : tools/profiler/tests/xpcshell.ini => tools/profiler/tests/xpcshell/xpcshell.ini
extra : moz-landing-system : lando
2019-04-30 09:49:53 +00:00
Kris Maglione b2f85650a1 Bug 1524687: Part 12 - Convert everything else to static registration. r=erahm
--HG--
extra : source : 625f71135038f79c075f758e316fbb00097c9a18
extra : intermediate-source : 7a1ef487a9e74d66b112034051e49b77023860b8
extra : histedit_source : 88d19dbee4a99faa191e49e2847c4c59aba05b0c%2C5ee702f97153152d31124e0c5f3e8318cbeb3195
2019-01-29 16:03:41 -08:00
arthur.iakab 470dbf03b6 Backed out 5 changesets (bug 1524687) for causing build bustages on platform.h CLOSED TREE
Backed out changeset 0f06a6b51bfe (bug 1524687)
Backed out changeset 7a1ef487a9e7 (bug 1524687)
Backed out changeset accad7b4cbc7 (bug 1524687)
Backed out changeset eb33f7e6467c (bug 1524687)
Backed out changeset 86cf09db340b (bug 1524687)
2019-02-21 02:04:02 +02:00
Kris Maglione 95c0cf7aa9 Bug 1524687: Part 12 - Convert everything else to static registration. r=erahm
--HG--
extra : rebase_source : ccc1b4f8559152237e523b67ea76e2b406c1cb11
extra : intermediate-source : e8ad5619116c31fc4d38e0e789ddb9b5d2a5bb25
extra : source : 625f71135038f79c075f758e316fbb00097c9a18
2019-01-29 16:03:41 -08:00
Masatoshi Kimura e59e3b3e20 Bug 1528651 - Fix some trivial warnings and re-enable warnings-as-errors on Windows in some directories. r=dmajor
--HG--
extra : source : 5ee9efeda9e67f6af0521be85266703763cc4c50
2019-02-19 20:42:11 +09: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
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
Margareta Eliza Balazs df311518fe Backed out 3 changesets (bug 1417976) for bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/GeckoProfiler.h CLOSED TREE
Backed out changeset 908f30faf4b6 (bug 1417976)
Backed out changeset 44ae0b8569b2 (bug 1417976)
Backed out changeset 801cdde1f597 (bug 1417976)
2018-11-02 18:42:21 +02:00
Nazım Can Altınova 95f5ae9b3a Bug 1417976 - Part 1: Store the information of DocShells in CorePS r=bzbarsky,mstange
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-02 16:17:23 +00:00
Jeff Muizelaar 5d4b15e6ee Bug 1500635. Expose ProfileJSONWriter. r=mstange
This lets ProfilerMarkerPayload implementations live outside of the profiler.

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

--HG--
rename : tools/profiler/core/ProfileJSONWriter.h => tools/profiler/public/ProfileJSONWriter.h
extra : moz-landing-system : lando
2018-10-23 12:42:32 +00:00
Randell Jesup 2fca240bb3 Bug 1464509: Add memory replacer with counters to the Gecko profiler r=glandium 2018-10-09 22:28:56 -04:00
Randell Jesup 708b2160bb Bug 1464509: Add per-process profiler counters r=mstange 2018-10-09 22:28:21 -04:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Markus Stange 5a266f1cbf Bug 1350500 - Compute the breakpadId for Firefox libraries on Android by mapping them into memory. r=glandium
--HG--
extra : rebase_source : 446a93c262641a55dfe35afefa7a28ef87b15092
2018-04-27 19:51:20 +09:00
Makoto Kato 7f841de419 Bug 1450185 - Implement DWARF stack walker for aarch64. r=jseward
Since aarch64's DWARF doesn't have pc register, I use x29 (link register) if
not first frame.

I test by gtest on Linux/aarch64, and profiler works on Android/aarch64.

EM_AARCH64 might not be defined on our builders since headers are old, so
this define is needed.

MozReview-Commit-ID: 8VDb5i0vwBT

--HG--
extra : rebase_source : abfe58624dabc2551deb03527db4be3b93490206
2018-04-12 18:22:03 +09:00
Markus Stange 683997b80b Bug 1437428 - Split ThreadInfo into three classes: ThreadInfo, RegisteredThread and ProfiledThreadData. r=njn
The file copies and renames make this patch look a bit confusing. Here's what
happens:

ThreadInfo.h:
Most of the code gets moved into RegisteredThread.h and ProfiledThreadData.h,
but a small piece remains in ThreadInfo.h.

ThreadInfo.cpp:
Gets split into RegisteredThread.cpp and ProfiledThreadData.cpp.
ThreadInfo.cpp itself goes away.

In the mercurial changeset, I've marked ThreadInfo.h as being copied to both
RegisteredThread.h and to ProfiledThreadData.h, and ThreadInfo.cpp as being
copied to RegisteredThread.cpp and as being renamed to ProfiledThreadData.cpp.

MozReview-Commit-ID: 1j1imAv9cTd

--HG--
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/ProfiledThreadData.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/ProfiledThreadData.h
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/RegisteredThread.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/RegisteredThread.h
extra : rebase_source : 91310691d5e46246ec03305511c1b86ab458b0b9
2018-02-16 22:43:51 -05:00
Cosmin Sabou 768831260e Backed out 2 changesets (bug 1437428) for frequent xpcfailures on marAppApplyUpdateStageOldVersionFailure.js a=backout
Backed out changeset b915e160a690 (bug 1437428)
Backed out changeset 0fcad4eaabb6 (bug 1437428)

--HG--
rename : tools/profiler/core/RegisteredThread.cpp => tools/profiler/core/ThreadInfo.cpp
2018-02-18 23:57:55 +02:00
Markus Stange 9fe1f51348 Bug 1437428 - Split ThreadInfo into three classes: ThreadInfo, RegisteredThread and ProfiledThreadData. r=njn
The file copies and renames make this patch look a bit confusing. Here's what
happens:

ThreadInfo.h:
Most of the code gets moved into RegisteredThread.h and ProfiledThreadData.h,
but a small piece remains in ThreadInfo.h.

ThreadInfo.cpp:
Gets split into RegisteredThread.cpp and ProfiledThreadData.cpp.
ThreadInfo.cpp itself goes away.

In the mercurial changeset, I've marked ThreadInfo.h as being copied to both
RegisteredThread.h and to ProfiledThreadData.h, and ThreadInfo.cpp as being
copied to RegisteredThread.cpp and as being renamed to ProfiledThreadData.cpp.

MozReview-Commit-ID: 1j1imAv9cTd

--HG--
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/ProfiledThreadData.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/ProfiledThreadData.h
rename : tools/profiler/core/ThreadInfo.cpp => tools/profiler/core/RegisteredThread.cpp
rename : tools/profiler/core/ThreadInfo.h => tools/profiler/core/RegisteredThread.h
extra : rebase_source : 91310691d5e46246ec03305511c1b86ab458b0b9
2018-02-16 22:43:51 -05:00
Julien Wajsberg 06141f6a5e Bug 1428076 - Add a mochitest r=mstange
MozReview-Commit-ID: EhNoJuMhrAS

--HG--
extra : rebase_source : 7433359ec2c4d0664042b3057006797a15ddfda4
2018-01-24 11:31:50 +01:00
Bas Schouten 3143ad47f1 Bug 1429623: Report tracing events and thread registration to VTune when --enable-vtune is enabled. r=mstange r=ted
MozReview-Commit-ID: I47OIX16ibf
2018-01-19 17:19:29 +01:00
Makoto Kato 336ace5ab7 Bug 1397776 - Removing armv6 config support for Android. r=glandium
We no longer support Android/armv6 and we requires NEON for Android/arm, so
we can remove armv6 support for Android.

MozReview-Commit-ID: Hh17BTyE0wR

--HG--
extra : rebase_source : 57e043ecb1bb57a026c0b656b82768b899ddae78
2017-12-15 16:32:54 -06:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
qiaopengcheng be9033b5a9 Bug 1403438 - Add profiler-lul on mips64-linux. r=sewardj
--HG--
extra : rebase_source : 9f507b59a77785d60a0944baf4dad27ec7d2e1c7
2017-09-28 02:04:00 -04:00
Nicholas Nethercote d90b841ba7 Bug 1405921 - Remove StackTop.{h,cpp}. r=mstange.
The platform-*.cpp files are a better place for GetStackTop().

--HG--
extra : rebase_source : eec7c038f45f002a62807d1e0033a76fcb17501e
2017-10-05 11:57:22 +11:00
Nicholas Nethercote 8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Nicholas Nethercote 37c96fc477 Bug 1380286 (attempt 2) - Introduce ProfilerStackCollector. r=mstange.
--HG--
extra : rebase_source : 7eac82fa5f01f48f239a804ff9d8d662cd1c44aa
2017-07-25 16:47:14 +10:00
Carsten "Tomcat" Book 965777ef3a Backed out changeset 3923ce220df3 (bug 1380286) for hazard failures 2017-07-25 08:44:13 +02:00
Nicholas Nethercote 6041274802 Bug 1380286 - Introduce ProfilerStackCollector. r=mstange.
This allows code outside the profiler to get fully interleaved stack traces
containing frames from the pseudo-stack, native stack, and JS stack.

--HG--
extra : rebase_source : e21b64e86ffec83a0052947afad1793f3fd62d00
2017-07-17 10:18:50 +10:00
Nicholas Nethercote 5d446671a8 Bug 1375776 (part 4) - Allow ProfilerMarkerPayload.h to be #included unconditionally. r=mstange.
This requires:

- Moving the constructors of ProfilerMarkerPayload and its subclasses into the
  .h file so they are visible even when ProfilerMarkerPayload.cpp isn't
  compiled.

- Similarly, using a macro to make StreamPayload() a crashing no-op when the
  profiler isn't enabled. (It is never called in that case.)

--HG--
extra : rebase_source : 7aad2fdb1bd4e49782024dba6664e8f992771520
2017-06-23 16:24:15 +10:00
Nicholas Nethercote 39b2397ba9 Bug 1369280 (part 2) - Merge ProfileGatherer into nsProfiler. r=mstange.
This makes things simpler in general, and lets us remove the
profiler_is_active() check in nsProfiler().
2017-06-02 11:59:32 +10:00
Markus Stange e2336b07a8 Bug 1330185 - Use a top-level PProfiler protocol to control the profiler in other processes. r=billm,njn
MozReview-Commit-ID: EROfGuYQ6a0

--HG--
extra : rebase_source : be0aa1b9c7963882e8e7d47964f2da5b670ab10a
extra : intermediate-source : e6f368f2d8741f2a9655b288d49b59fbbd6b90b7
extra : source : 51cdc2541486d5ddf2d385ec0459a9ec38b8775b
2017-05-30 15:06:14 -04:00
Nicholas Nethercote 0840bb61c6 Bug 1366650 (part 1) - Move PseudoStack into SpiderMonkey. r=mstange,shu.
This includes renaming its fields to match SpiderMonkey naming conventions
instead of Gecko naming conventions.

This patch is just about moving the code. The next patch will change
SpiderMonkey to actually use PseudoStack directly.

--HG--
extra : rebase_source : 27e77ddf950201eb6bdba60003218056442cf7ab
2017-05-26 09:37:28 +10:00
Phil Ringnalda 6368ef89e2 Backed out 5 changesets (bug 1330185, bug 1330184) for leaking an nsTArray_base from the plugin process on Win8
Backed out changeset e6f368f2d874 (bug 1330185)
Backed out changeset 2b8d50fcb20f (bug 1330184)
Backed out changeset dbe452a9eebb (bug 1330184)
Backed out changeset e13b9e798e16 (bug 1330184)
Backed out changeset 52489c7eadaf (bug 1330184)

MozReview-Commit-ID: 8L20BZ5E3t2
2017-05-22 19:45:35 -07:00
Markus Stange 9bf6b534a2 Bug 1330185 - Use a top-level PProfiler protocol to control the profiler in other processes. r=njn, r=billm
MozReview-Commit-ID: EROfGuYQ6a0

--HG--
extra : rebase_source : 3495ccc7700703cc587f571dfc12e46a682c29a2
extra : source : 51cdc2541486d5ddf2d385ec0459a9ec38b8775b
2017-05-22 13:47:02 -04:00
Markus Stange 42b5d166ec Back out bug 1330184 and bug 1330185 because of test failures.
MozReview-Commit-ID: ILD4mevlSU6
2017-05-21 15:11:15 -04:00
Markus Stange b5fdcd479d Bug 1330185 - Use a top-level PProfiler protocol to control the profiler in other processes. r=njn, r=billm
MozReview-Commit-ID: EROfGuYQ6a0

--HG--
extra : rebase_source : de266bda4fc2d6532ff45a6d548b13cd0b4f7206
extra : histedit_source : ad5c4e140c068f17c51d5085fd88ac691e50ab4f
2017-05-21 14:06:50 -04:00
Nicholas Nethercote 7d44af05e2 Bug 1365824 - Remove STORE_SEQUENCER. r=froydnj.
It's a software memory barrier, and not a very strong one. If the values it is
protecting are Atomic, that provides a stronger hardware memory barrier.

This patch removes it, and changes one of the values it was protecting from
|volatile| to Atomic. (The other value it was protecting was already Atomic.)
2017-05-18 13:24:13 +10:00
Ehsan Akhgari 8a04849cee Bug 1362814 - Part 2: Move GeckoProfilerReporter to its own header; r=mstange
This allows us to get rid of the nsIMemoryReporter.h inclusion in GeckoProfiler.h.
That brings XPCOM string headers with it.
2017-05-12 02:35:09 -04:00
Dan Banner 7e986db6b0 Bug 1351091 - Remove unreferenced Profiler.jsm file r=BenWa
MozReview-Commit-ID: 7nlrsdmEwS8

--HG--
extra : rebase_source : 38259896ef39a9694dbd985714ae430ac245b96f
2017-05-04 17:03:49 +01:00
Jim Chen 3434ba087b Bug 1360322 - 3. Only build LUL on supported architectures; r=mstange
Only build LUL and its tests on ARM, x86, and x86_64, because only those
architectures are currently supported by LUL.
2017-05-03 11:36:18 -04:00
Jim Chen 7041014748 Bug 1360322 - 2. Add initial AArch64 support to Gecko profiler; r=mstange
Add enough AArch64-specific code for the Gecko profiler to build.
2017-05-03 11:36:18 -04:00
Jim Chen 28cf921283 Bug 1360322 - 1. Convert tools/profiler/moz.build to Unix line ending; r=me 2017-05-03 11:36:18 -04:00
Nicholas Nethercote 93b0b152aa Bug 1123754 (part 2) - Move ProfilerMarker into ProfilerMarker.h. r=mstange.
ProfilerMarker is simple enough that it's best to fully define it in
ProfilerMarker.h, without introducing a ProfilerMarker.cpp.

This requires moving STORE_SEQUENCER() into its own header, StoreSequencer.h.

As a result, the following types are no longer visible outside the profiler:
ProfilerMarker, ProfilerLinkedList, ProfilerMarkerLinkedList,
ProfilerSignalSafeLinkedList. (PseudoStack.h now contains the PseudoStack class
and nothing else.)

The patch also makes the following non-obvious changes.

- It changes ProfilerMarker::{mMarkerName,mPayload} to unique pointers, which
  removes the need for an explicit ~ProfilerMarker().

- It removes ProfilerMarker::GetMarkerName(), because that method is only used
  within ProfilerMarker itself.

--HG--
extra : rebase_source : 22bdfb1c9c30751253ed66352d7edd51d308152d
2017-04-27 07:36:22 +10:00