Commit Graph

1570 Commits

Author SHA1 Message Date
Markus Stange
65a2f49bfc Bug 1429904 - Make FrameKey members const. r=njn
MozReview-Commit-ID: KTYmCJM9tOH

--HG--
extra : rebase_source : a79087883f4e39a94bd733b45fd63525a25dd7d9
2018-02-27 23:11:34 -05:00
Markus Stange
d7b602ad6f Bug 1429904 - Add another constructor to FrameKey which initializes mLine and mCategory, and use it in one place. r=njn
MozReview-Commit-ID: 1LliQMGjfjx

--HG--
extra : rebase_source : 21ae38d0dd9f238193fa462641a7147c0e8fbf14
2018-02-27 23:10:06 -05:00
Markus Stange
36aeb88c58 Bug 1429904 - Let the compiler implement the FrameKey copy constructor for us. r=njn
MozReview-Commit-ID: 9e9rMkEAyeL

--HG--
extra : rebase_source : f803a42699b8daa8cb045db6f4048107f2d2e26e
2018-02-27 23:08:19 -05:00
Markus Stange
dfbd63d53c Bug 1429904 - Remove mHash which is now unused. It was only used by FrameKey::operator<. r=njn
MozReview-Commit-ID: 5Jc6EYmoZfS

--HG--
extra : rebase_source : c9876742df020c9f97e4f68694605c72ecba8fc1
2018-02-27 23:06:31 -05:00
Markus Stange
9cd2c5d435 Bug 1429904 - Remove unused operator< from StackKey and FrameKey. r=njn
nsGenericHashKey never calls this operator, as far as I can tell.

MozReview-Commit-ID: NDybMI8DOA

--HG--
extra : rebase_source : 5a8182a5e1f2af57533ddff8848d7a772bf7eeb2
2018-02-27 22:41:35 -05:00
Markus Stange
fcdbc4f32f Bug 1439168 - Return profiled threads sorted by registration time. r=njn
MozReview-Commit-ID: 6grx6eSLteQ

--HG--
extra : rebase_source : 4a2a7c83f2c77dd9742d4be4047f5224b1759a40
2018-02-12 01:07:59 -05: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
Markus Stange
fa1eca48cc Bug 1437428 - Make PseudoStack a member of RacyInfo instead of inheriting from it. r=njn
MozReview-Commit-ID: 3fumT1Livf6

--HG--
extra : rebase_source : fa201a7023ba9ffa5d0d23e2886ad151f4a7930a
2018-01-31 17:42:49 -05:00
Sylvestre Ledru
1e5d4345d7 Bug 1438471 - Remove dead code: nm-symbolicate.py r=mstange
MozReview-Commit-ID: 7qaYBvLzPZL

--HG--
extra : rebase_source : 32d70ea42c5d286b074dde3f55090f6f2437d734
2018-02-22 08:59:39 +01: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
Chris Peterson
d09123f248 Bug 1436263 - Part 1: Replace final override virtual function specifiers with just final. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08: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
Markus Stange
8bb2083b22 Bug 1437428 - Make PseudoStack a member of RacyInfo instead of inheriting from it. r=njn
MozReview-Commit-ID: 3fumT1Livf6

--HG--
extra : rebase_source : fa201a7023ba9ffa5d0d23e2886ad151f4a7930a
2018-01-31 17:42:49 -05:00
Jashank Jeremy
5e7e2c2a06 Bug 1438120 - Fix non-MOZ_GECKO_PROFILER build by adding the missing AUTO_PROFILER_LABEL_FAST declaration. r=mstange
--HG--
extra : amend_source : ba4360be040c3d765f380d3c92e6fabf0cdfd436
2018-02-15 22:27:33 -05:00
Markus Stange
36b552905a Bug 1434965 - Take 'streaming generation' into account when de-duplicating JIT frames. r=njn
MozReview-Commit-ID: KlhSPY4ZrOR

--HG--
extra : rebase_source : 801fa6a577f7e218c0bd5fd5554f28880c5c5e7c
2018-02-10 20:03:36 -05:00
Markus Stange
01745f4e91 Bug 1434965 - Don't store a JSContext pointer in UniqueStacks; pass it manually to the functions that need it. r=njn
This resolves the bug where we attempted to find information about JitReturnAddr
entries which were collected with a new JSContext by asking an old JSContext.

MozReview-Commit-ID: FQrnAuwwzHU

--HG--
extra : rebase_source : d0a0c7077199dc177123bb54951f4f7238c5eaf6
2018-02-10 19:17:05 -05:00
Markus Stange
655bb7136b Bug 1434965 - Eliminate custom StringKey class by using nsCStringHashKey. r=njn
MozReview-Commit-ID: HRYfXI43wmE

--HG--
extra : rebase_source : c12db1ffc6c4f974676d086f9182b8ce994d2f91
2018-02-10 19:05:19 -05:00
Markus Stange
0fa0457987 Bug 1434965 - Add ForEachTrackedOptimizationTypeInfoLambdaOp. r=njn
This makes the JSON serialization code for optimization type info a little
easier to read.

MozReview-Commit-ID: 2auHVmp7hKw

--HG--
extra : rebase_source : 1fbcf4dc63a24822f5411a7107af0e07a703a4bf
2018-02-12 14:48:44 -05:00
Markus Stange
77e86db941 Bug 1434965 - Create an implementation of JS::ForEachTrackedOptimizationAttemptOp which takes a lambda. r=njn
This moves the meat of the processing from operator() into the lambda, so that
it can be read in the function that calls forEachOptimizationAttempt. Now the
person who wants to understand this code hopefully won't need to scroll up and
down as much.

MozReview-Commit-ID: H9zRf1Vbswg

--HG--
extra : rebase_source : a742fa4c076437c7af6837280f725ee4532cbf2c
2018-02-12 14:48:09 -05:00
Markus Stange
14feaf3477 Bug 1434965 - Add AutoArraySchemaWriter::FreeFormElement so that FillUpTo can be private. r=njn
This may seem like an unnecessary increase in complexity, and it probably is.
But it makes it easier to reason about lifetimes if your mind is accustomed to
Rust, which would enforce a similar solution.

MozReview-Commit-ID: kJZifbjCSU

--HG--
extra : rebase_source : a2906eb296975ca689c2c3a019c33062ba17b0f2
2018-02-10 17:41:35 -05:00
Markus Stange
b9043767e5 Bug 1434965 - Remove AutoArraySchemaWriter constructor that doesn't take a string table. r=njn
WriteSamples doesn't really need the ability to write strings, but always passing
a string table means that there's one less thing to worry about (one less piece of
unsafe API).

MozReview-Commit-ID: 386OEibyush

--HG--
extra : rebase_source : 4fa6428b6371cf4c3db5ad77aac06c0113b2e541
2018-02-10 16:54:24 -05:00
Markus Stange
4e334139e5 Bug 1434965 - Remove OnStackFrameKey and solve frame canonicalization differently. r=njn
MozReview-Commit-ID: DITzwF94U64

--HG--
extra : rebase_source : 8d5c40b2bdcd22ee87ca8429d95b026309f932d5
2018-02-12 14:00:05 -05:00
Markus Stange
e53f99f34a Bug 1434965 - Split StreamFrame into two different implementations for JIT and non-JIT frames. r=njn
MozReview-Commit-ID: Ap4FVS8FMKh

--HG--
extra : rebase_source : fe827adea0b37f6f60923bdb30d1f4e66653e24e
2018-02-10 15:14:28 -05:00
Markus Stange
f0459d39c9 Bug 1434965 - Remove Stack class and use intended-to-be-immutable StackKeys. r=njn
I wasn't comfortable with how Stack had a reference to the UniqueStacks object.
Now we compute new the new stack index after appending a frame by explicitly
calling a method of the UniqueStacks object.

MozReview-Commit-ID: KQAI9JNb4ag

--HG--
extra : rebase_source : 5d4c7a3f637f8e2bbd4e84c3aca65290a731a206
2018-02-09 18:18:34 -05:00
Markus Stange
8fb2503b8a Bug 1434965 - Replace callback-based API ForEachProfiledFrame with an iterator-based API called GetProfiledFrames. r=njn
This also renames ForEachProfiledFrameOp::FrameHandle to ProfiledFrameHandle.

MozReview-Commit-ID: 7Jh1x2QWjXe

--HG--
extra : rebase_source : 8bb0fa15fa20215f03148cfd30ae0e41f82330fd
2018-02-10 20:38:41 -05:00
Markus Stange
e92440806d Bug 785440 - Add AUTO_PROFILER_LABEL_FAST. r=njn
This gets the pseudostack from the JSContext instead of using TLS, and only
pushes a pseudo stack frame if the profiler is active.

MozReview-Commit-ID: IzT4py9H8su

--HG--
extra : rebase_source : 9962455d59e3f8b85a347f4203ac619e654fcb7c
extra : source : f15e6874f6c14f7a5e5b0cb63acd0a95ad34db4e
2018-01-05 14:37:42 +01:00
Markus Stange
7a2c359a92 Bug 785440 - Move profiler_is_active() implementation (and RacyFeatures) into GeckoProfiler.h. r=njn
MozReview-Commit-ID: D8y5RK2t6N4

--HG--
extra : rebase_source : 50513145561a1123c47741cb845e9b4adcf104a0
extra : intermediate-source : 85c8d7e4a5eb1616d36d4ec7916e3b077da3b236
extra : source : 5dda2adf525363b32844ea8162235fae3b54d17d
2017-08-02 14:39:55 -04:00
Markus Stange
dee289ad9c Bug 1436924 - Group mUniqueStacks, mSavedStreamedSamples and mSavedStreamedMarkers into a PartialThreadProfile struct that's heap-allocated on demand. r=njn
MozReview-Commit-ID: 5WNrIWLsiM1

--HG--
extra : rebase_source : 3ecf5efc3ce61a642187a1a675e9c014f468eee5
2018-02-09 00:56:55 -05:00
Markus Stange
16a2f41aaa Bug 1355566 - Make sure js::EnableContextProfilingStack(cx, false) is called before shutdown collection. r=njn
MozReview-Commit-ID: 6cPCSeTUdEP

--HG--
extra : rebase_source : 98b6617a3bab4698c03921d451052ff5177ad202
2018-02-08 16:43:23 -05:00
Benjamin Bouvier
3d5c7891a5 Bug 1319203: Fix asm.js profiler test; r=me 2018-02-09 14:47:10 +01:00
Markus Stange
a91565e4f5 Bug 1433583 - Discard information about old dead threads that no longer have any samples in the buffer. r=mystor
MozReview-Commit-ID: 5ThtN1H1ieA

--HG--
extra : rebase_source : f853ff92147a4d57fd778723eda32c78847e8ca5
extra : source : 61ede7cb13a5de066601492ca34eb97e17e3e6fe
2018-01-30 16:00:29 -05:00
Julien Wajsberg
7642763ce5 Bug 1428072 - 3/3 - Add a mochitest to test profiling better r=mstange
MozReview-Commit-ID: BOoS37yFznU

--HG--
extra : rebase_source : bf5e87333dcfe4eceedc8d904fe49f34ff029aec
2018-01-31 15:11:51 +01:00
Julien Wajsberg
dc7beae272 Bug 1428072 - 2/3 - Reorganize mochitest files for the profiler r=mstange
We extract some common framework to run profiler tests.

MozReview-Commit-ID: 7FPcH1NpJ7S

--HG--
extra : rebase_source : a487cb34c50889112eaecc8a20553365cfb70cfa
2018-01-31 10:51:19 +01:00
Julien Wajsberg
cf225ab9c6 Bug 1428072 - 1/3 - Change the implementation of isChromeJSScript so that it doesn't crash for workers r=bz,sfink
In this patch we also expose a script's compartment in jsfriendapi.h

MozReview-Commit-ID: LgoN8ANLgxI

--HG--
extra : rebase_source : a9a29e538041ac574b6b44fab166a7838fce54ac
2018-01-18 17:14:09 +01:00
Markus Stange
78b15a3110 Bug 1434968 - Clear mUniqueStacks, mSavedStreamedSamples and mSavedStreamedMarkers when the profiler is stopped. r=njn
MozReview-Commit-ID: L1Lk0sj2Bub

--HG--
extra : rebase_source : 842b53979122b20687b64278c2be6e706c92991e
2018-02-06 17:45:39 -05:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Markus Stange
7e880fe1f8 Bug 1431179 - Keep all exit profiles that overlap with the parent process's buffer time range. r=mconley
MozReview-Commit-ID: 1DIYQZ70ckR

--HG--
extra : rebase_source : f7f5e8e2d0380b54c50cb20b3d109cb476a2530f
extra : source : 612e54e7001a5907761d831b92aed5cee0deb017
2018-02-06 15:29:05 -05:00
Markus Stange
125c79a8ce Bug 1431179 - Remove the API to obtain the time of the first sample during profile streaming. r=mystor
MozReview-Commit-ID: KfZLNIAx4gy

--HG--
extra : rebase_source : 6b1a2dc19955a3a19877403f36d9dad551a9dc8a
extra : source : 6a241d9b3d1adf1afa72aab53ef8e15ece75fe90
2018-01-26 15:30:55 -05:00
Markus Stange
030cf34ac9 Bug 1431179 - When storing an exit profile, remember the current write position of the parent process's profiler buffer, instead of a TimeStamp. r=mystor
MozReview-Commit-ID: 3SFo9r5VrcZ

--HG--
extra : rebase_source : 2be8143e369de6dab82e1c1ef40a049aa478276c
extra : source : 9531d79fa5c3de2051a31fc475f6bbe3c93659a6
2018-01-30 13:28:35 -05:00
Markus Stange
49d6d03730 Bug 1348959 - Remove wraparound indexing in ProfileBuffer. r=djvj,mystor,njn
MozReview-Commit-ID: LeBFSRE6GXR

--HG--
extra : rebase_source : c46c0cd0dd543a367f72000e3cae65260a25b365
extra : source : 0f2e9dd7d45551d40944e4219e5a9eb92d54b2c4
2018-02-06 00:25:30 -05:00
Markus Stange
519cb27db8 Bug 1348959 - Make profiler_get_buffer_info() return information in a struct instead of using outparams. r=mystor,njn
MozReview-Commit-ID: 1iJ05NxOdou

--HG--
extra : rebase_source : 1c4e654340630b0f21c165b41b8fc1be30743c48
extra : source : 64b1a4108f6c3319cfc74c1246bdd2e895e93e1a
2018-01-18 17:54:57 -05:00
Markus Stange
656fd03724 Bug 1348959 - Make ProfileBuffer fields uint32_t. r=mystor,njn
MozReview-Commit-ID: veIGhEQyK5

--HG--
extra : rebase_source : 2c1853f666afd300ff82a2717f1a7caf9a19cf98
extra : source : e3d8bdc726d6045f69f3c3efa4e91c499a418428
2018-01-18 17:54:33 -05:00
Narcis Beleuzu
0777e2f8f7 Backed out Bug 1428072 for mochitest-chrome leaks
Backed out changeset b39c21c2a7a4 (bug 1428072) for mochitest-chrome leaks
***
Backed out changeset 9acb3d3eb5bc (bug 1428072)
***
Backed out changeset b5a327bb02d4 (bug 1428072)

--HG--
extra : histedit_source : 9de43525a11c34bb0e48c0820857d1731d4e7a08%2Cd3f59b67cd382c41cd0b68fd0f7a521a1051d20c
2018-02-06 15:48:32 +02:00
Julien Wajsberg
ca83804232 Bug 1428072 - 3/3 - Add a mochitest to test profiling better r=mstange
MozReview-Commit-ID: 7tNEXHzFzRo

--HG--
extra : rebase_source : 3cb7fe208f6048c286c62be3216d09d5ea4eace4
2018-01-31 15:11:51 +01:00
Julien Wajsberg
163c3aa665 Bug 1428072 - 2/3 - Reorganize mochitest files for the profiler r=mstange
We extract some common framework to run profiler tests.

MozReview-Commit-ID: 7ct5RMhwmOe

--HG--
extra : rebase_source : 01165c506a4325310c23c9be6de2f5e6f958cf00
2018-01-31 10:51:19 +01:00
Julien Wajsberg
51a60aaee4 Bug 1428072 - 1/3 - Change the implementation of isChromeJSScript so that it doesn't crash for workers r=bz,sfink
In this patch we also expose a script's compartment in jsfriendapi.h

MozReview-Commit-ID: JGTLygZ6DK5

--HG--
extra : rebase_source : 585edbdbc74044f2d644f5046513786ee4f42a2f
2018-01-18 17:14:09 +01:00
Gurzau Raul
bb16936244 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-02-02 00:25:44 +02:00
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Dorel Luca
aefaa99a3a Backed out 3 changesets (bug 1431755) for Mochitest failure on test_profile_worker_bug_1428076.html on a CLOSED TREE
Backed out changeset c1befb56cf4d (bug 1431755)
Backed out changeset 8116e9cfc3f0 (bug 1431755)
Backed out changeset 1878f143ccda (bug 1431755)
2018-01-31 00:58:04 +02:00
arthur.iakab
c4dd80eca3 Merge mozilla-central to autoland 2018-01-31 00:41:58 +02:00