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

59 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 1b418b1c18 Bug 1369644 - Remove use of |volatile| from ProfileEntry. r=mstange,shu,jseward,froydnj.
These annotations aren't doing anything useful. The important thing with
the PseudoStack is that, during pushes, the stack pointer incrementing happens
after the new entry is written, and this is ensured by the stack pointer being
Atomic.

The patch also improves the comments on PseudoStack.

--HG--
extra : rebase_source : 100f8a5e4b750c15fac66175550c4c284a141f16
2017-06-02 17:16:56 +10:00
Nicholas Nethercote 2b5f064d4e Bug 1369276 (part 2) - Convert ProfileEntry::Flags to Kind. r=shu.
There are three flags in ProfileEntry::Flags, which suggests there are 2**3 = 8
combinations. But there are only actually 4 valid combinations.

This patch converts the three flags to a single "kind" enum, which makes things
clearer. Note also that the patch moves the condition at the start of
AddPseudoEntry() to its callsite, for consistency with the earlier JS_OSR entry
kind check.

--HG--
extra : rebase_source : 0950769ee1530291860ef3be47d240df5939e871
2017-06-02 12:46:09 +10:00
Nicholas Nethercote 82d74fe1f0 Bug 1367654 (part 1) - Clean up ProfileEntry. r=shu.
This patch:

- renames flags_ as flagsAndCategory_ because it contains both the flags and
  the category;

- uses << for some bitfield definitions, because it's easier to read;

- removes some dead methods from ProfileEntry;

- removes the unnecessary JS_FRIEND_API from setPC().

--HG--
extra : rebase_source : 24e24b2f6c948b770293ea497be4933f58be3722
2017-05-26 14:54:31 +10:00
Nicholas Nethercote a062b9be51 Bug 1366650 (part 2) - In GeckoProfiler, do all pseudo-stack accesses via the PseudoStack class, instead of via raw array manipulation. r=mstange,shu.
- The profiler gives the JS engine a reference to the pseudo-stack via
  SetContextProfiilngStack(). That function now takes a |PseudoStack*| instead
  of a |ProfileEntry*| and pointer to the stack pointer.

- PseudoStack now has a |kMaxEntries| field, which is easier to work with than
  |mozilla::ArrayLength(entries)|.

- AddressOfStackPointer() is no longer needed.

- The patch also neatens up the push operations significantly. PseudoStack now
  has pushCppFrame() and pushJsFrame(), which nicely encapsulate the two main
  cases. These delegate to the updated initCppFrame() and initJsFrame()
  functions in ProfileEntry.

- Renames max_stck in testProfileStrings.cpp as peakStackPointer, which is a
  clearer name.

- Removes a couple of checks from testProfileStrings.cpp. These checks made
  sense when the pseudo-stack was accessed via raw manipulation, but are not
  applicable now because we can't artificially limit the maximum stack size so
  easily.
2017-05-26 09:51:31 +10: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
Nicholas Nethercote d1e495344b Bug 1365854 - Remove FRAME_LABEL_COPY. r=mstange,shu.
ProfileEntry has |string|, which can be static or dynamic, and |dynamicString|.
If |string| is dynamic, the FRAME_LABEL_COPY flag must be set, and it will be
copied into profiler output.

But there is only one place that uses dynamic |string| values, in SpiderMonkey.
And that place doesn't use |dynamicString|. So this patch changes that place to
use an empty |string| and put the old dynamic |string| value in
|dynamicString|. This in turn removes the need for FRAME_LABEL_COPY.

One minor wrinkle is that when |dynamicString| is used the old code put a space
between |string| and |dynamicString|. The new code omits the space if |string|
is empty.

The patch also renames ProfileEntry::string as ProfileEntry::label_, which
better matches how it's used, and ProfileEntry::dynamicString as
ProfileEntry::dynamicString_ so the getter can be renamed dynamicString().
2017-05-18 17:17:46 +10:00
Carsten "Tomcat" Book 68e9a2dfd5 Merge mozilla-central to mozilla-inbound 2017-04-26 09:04:59 +02:00
Nicholas Nethercote 5106aa14b9 Bug 1359007 - Remove js::ProfilingGetPC(). r=shu.
AddPseudoEntry() has a single callsite which always passes nullptr for the
last argument. This means that js::ProfilingGetPC() is never called, and so can
be removed. (Even if it was called, it always returns nullptr because ipToPC()
always returns nullptr!)

--HG--
extra : rebase_source : 1260d726c79bf5116143da9904d39b38e3c93837
2017-04-26 14:32:26 +10:00
Tom Tromey 66313f92eb Bug 1349655 - remove sig_safe_t in favor of mozilla::Atomic<uint32_t>; r=djvj,njn
Remove the definition of sig_safe_t, which is only used by PseudoStack,
and replace the uses with mozilla::Atomic<uint32_t>.

MozReview-Commit-ID: GcPd9R94Vci

--HG--
extra : rebase_source : dcc05a219d59ffdc0486ef2e7118d888c6a93fda
2017-03-22 13:57:31 -06:00
Markus Stange 730b4fc829 Bug 1339897 - Rename PROFILER_LABEL_PRINTF to PROFILER_LABEL_DYNAMIC and make it really cheap. r=Ehsan,njn
Instead of copying and concatenating strings into an mDest buffer in
SamplerStackFramePrintfRAII, require callers to keep the string buffer alive
for the duration of the current scope, and store the pointer to the annotation
string in the ProfileEntry. During stackwalking, concatenate the label and the
annotation (separated by a space) and store the resulting string in the
profile buffer.

MozReview-Commit-ID: GEjcLrhhdvb

--HG--
extra : rebase_source : 683749421ee2122805a249cf413e882ee5f33331
2017-03-22 19:37:33 -04:00
Boris Zbarsky 746467862d Bug 1346389. Make --enable-shared-js link again, at least for an opt mac build with intl api disabled. r=sfink, a=waldo on the gcc-specific bits. 2017-03-10 23:52:55 -05:00
Boris Zbarsky d6b2fc9b4d Backed out changeset c1978f7d49c4 for build failures.
MozReview-Commit-ID: FOwcGtykkXR
2017-03-11 00:10:36 -05:00
Boris Zbarsky 160b2e80e9 Bug 1346389. Make --enable-shared-js link again, at least for an opt mac build with intl api disabled. r=sfink
MozReview-Commit-ID: 264vsCvhh9Z
2017-03-10 23:52:55 -05:00
Nicholas Nethercote f4ea404f5e Bug 1333296 (part 6) - Remove SPS references in js/. r=shu.
The most significant thing about this is that it changes some built-in function
names:
- enableSPSProfiling() -> enableGeckoProfiling()
- enableSPSProfilingWithSlowAssertions() -> enableGeckoProfiling(WithSlowAssertions)
- disableSPSProfiling() -> disableGeckoProfiling()
- {en,dis}ableSPSProfiling*() -> {en,dis}ableGeckoProfiling*()
- readSPSProfilingStack() -> readGeckoProfilingStack()

It also requires two filename changes:
- SPSProfiler.{h,cpp} -> GeckoProfiler.{h,cpp}

And some type name changes, e.g.:
- AutoSPSEntry -> AutoGeckoProfilerEntry
- SPSProfiler -> GeckoProfiler
- SPSInstrumentation -> GeckoProfilerInstrumentation
- SPSEntryMarker -> GeckoProfilerEntryMarker
- SPSBaselineOSRMarker -> GeckoProfilerBaselineOSRMarker

And various method/function/variable name changes, and some comment changes.

--HG--
rename : js/src/vm/SPSProfiler.cpp => js/src/vm/GeckoProfiler.cpp
rename : js/src/vm/SPSProfiler.h => js/src/vm/GeckoProfiler.h
extra : rebase_source : f681e2c3c269aec483bba9d60c7afc39776e14bf
2017-01-25 09:08:15 +11:00
Jon Coppeard d97a19687b Bug 1298639 - Use bytecode offsets rather than direct pointer in profiling API r=shu 2016-09-13 14:06:46 +02:00
Nick Fitzgerald 2fb353111f Bug 1296399 - Make sure that the js::ProfileEntry::Flags fit in the type that they are used with. r=shu
--HG--
extra : rebase_source : 69e9c5e56ab7974c2fb28f95a9b9a0e1d75f0ae5
2016-08-18 12:35:00 -04:00
Jan de Mooij 0ad12515f4 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Jon Coppeard a49aa74ce1 Bug 1259180 - Compact arenas containing scripts r=terrence 2016-04-13 10:03:44 +01:00
Victor Porof 8dd039677b Bug 1258302 - Create a categories module instead of placing everything in global.js, r=jsantell 2016-03-22 10:17:20 +01:00
J. Ryan Stinnett 4f1af0e003 Bug 912121 - Update misc. DevTools paths and comments. rs=devtools
--HG--
extra : commitid : BSf4D59s9HF
extra : rebase_source : 4d14e1aa3ad93bbb426861336e8b703bc1e0b3af
2015-09-21 12:07:31 -05:00
Nick Fitzgerald 8098307c50 Bug 1204584 - Ensure that entries created by AutoSPSEntry propogate their category information; r=djvj
This commit renames ProfileEntry::set{Js,Cpp}Frame methods to
ProfileEntry::init{Js,Cpp}Frame to highlight the fact that they are intended to
initialize the entry, and that setting other flags should happen after one of
these calls.
2015-09-19 11:19:07 +02:00
Nick Fitzgerald 89e4d96d13 Bug 1204613 - Add a static_assert that ProfileEntry::{Flags,Category} do not overlap; r=djvj
--HG--
extra : rebase_source : d5c6e873e2f10479b92da829d93af0a36bba6f82
2015-09-14 11:57:00 +02:00
Nick Fitzgerald 31d58123f4 Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj 2015-09-14 12:15:12 -07:00
Nigel Babu 962c78b6e0 Backed out changeset 3fac2976a472 (bug 1204168) for build bustage
CLOSED TREE
2015-09-14 22:11:51 +05:30
Nick Fitzgerald c65c4a0250 Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj 2015-09-14 09:19:59 -07:00
Benoit Girard 59ad1c9d28 Bug 1172186 - Make the profiler build standalone. r=mstange
--HG--
extra : commitid : BTYjbUK8Kkf
extra : rebase_source : 48b78ab373d4019fb42cc39cdc66586da33eb069
2015-06-18 01:05:42 -04:00
Victor Porof 4b7d7bd9d0 Bug 1167300 - Consolidate the performance tool directory, r=jsantell
--HG--
rename : browser/devtools/shared/timeline/global.js => browser/devtools/performance/modules/global.js
rename : browser/devtools/performance/modules/actors.js => browser/devtools/performance/modules/logic/actors.js
rename : browser/devtools/performance/modules/compatibility.js => browser/devtools/performance/modules/logic/compatibility.js
rename : browser/devtools/shared/profiler/frame-utils.js => browser/devtools/performance/modules/logic/frame-utils.js
rename : browser/devtools/performance/modules/front.js => browser/devtools/performance/modules/logic/front.js
rename : browser/devtools/performance/modules/io.js => browser/devtools/performance/modules/logic/io.js
rename : browser/devtools/shared/profiler/jit.js => browser/devtools/performance/modules/logic/jit.js
rename : browser/devtools/shared/timeline/marker-utils.js => browser/devtools/performance/modules/logic/marker-utils.js
rename : browser/devtools/performance/modules/recording-model.js => browser/devtools/performance/modules/logic/recording-model.js
rename : browser/devtools/performance/modules/recording-utils.js => browser/devtools/performance/modules/logic/recording-utils.js
rename : browser/devtools/shared/profiler/tree-model.js => browser/devtools/performance/modules/logic/tree-model.js
rename : browser/devtools/performance/modules/graphs.js => browser/devtools/performance/modules/widgets/graphs.js
rename : browser/devtools/shared/timeline/marker-details.js => browser/devtools/performance/modules/widgets/marker-details.js
rename : browser/devtools/shared/timeline/markers-overview.js => browser/devtools/performance/modules/widgets/markers-overview.js
rename : browser/devtools/shared/profiler/tree-view.js => browser/devtools/performance/modules/widgets/tree-view.js
rename : browser/devtools/shared/timeline/waterfall.js => browser/devtools/performance/modules/widgets/waterfall.js
2015-05-22 16:25:52 -04:00
Jan de Mooij b8b1677f0f Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 23:22:11 +01:00
Phil Ringnalda c8a25251c1 Backed out changeset 0c030f97a04f (bug 1144366) for being on top of patches being backed out
CLOSED TREE
2015-03-28 10:39:56 -07:00
Jan de Mooij 8d6d44ecb8 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 12:08:37 +01:00
Masatoshi Kimura 6cc5dabbee Bug 1111290 - Part 3: Remove TypedEnum.h and fold TypedEnumInternal.h into TypedEnumBits.h. r=waldo 2015-01-26 07:22:11 +09:00
Masatoshi Kimura 86502e6537 Bug 1111290 - Part 2: Non-mechanical changes. r=waldo 2015-01-26 07:22:08 +09:00
Kannan Vijayan aef7e0502e Bug 1057082 - 6/7 - Modify profiler sampler to use jit stack walking instead of pseudostack. r=jandem r=BenWa 2015-01-15 20:11:22 -05:00
Wes Kocher 235c27f622 Backed out 8 changesets (bug 1057082) for ASAN failures on a CLOSED TREE
Backed out changeset 0c1fabbfc583 (bug 1057082)
Backed out changeset 99213cacd671 (bug 1057082)
Backed out changeset 76d528767946 (bug 1057082)
Backed out changeset b1ad3dabec8f (bug 1057082)
Backed out changeset f927b9899077 (bug 1057082)
Backed out changeset 635e101ed2be (bug 1057082)
Backed out changeset a7d9f158838d (bug 1057082)
Backed out changeset b1cb68eadf6c (bug 1057082)
2015-01-14 15:26:50 -08:00
Kannan Vijayan f4638168e9 Bug 1057082 - 6/7 - Modify profiler sampler to use jit stack walking instead of pseudostack. r=jandem r=BenWa 2015-01-14 16:19:14 -05:00
Masatoshi Kimura bf312ad056 Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Dan Gohman 00b4fef72c Bug 1054334 - SpiderMonkey: Delete unneeded semicolons r=nbp 2014-08-18 12:20:39 -07:00
Victor Porof ecac4bb9d0 Bug 879008 - New UI for the sampling Profiler, r=rcampbell,fitzgen,pbrosset 2014-08-06 11:25:18 -04:00
Luke Wagner 0accc7e372 Bug 1040390 - Integrate JS::ProfilingFrameIterator with the profiler (r=bgirard)
--HG--
extra : rebase_source : 7f9a022fb16a353d22242f60cfae4e5659798752
2014-07-29 09:56:22 -05:00
Victor Porof b3b4be1879 Bug 1017790 - Expose category information in the profiler data, r=djvj 2014-06-04 14:37:49 -04:00
Victor Porof 90e774e163 Bug 1019182 - ProfileEntry flags should be zeroed when setting frame data, r=djvj 2014-06-04 14:37:49 -04:00
Phil Ringnalda 3e5340dd29 Merge f-t to m-c 2014-05-31 20:31:07 -07:00
Victor Porof ebedad1bb5 Bug 1007203 - Set the categories as flags on profile entries, r=djvj 2014-05-30 21:41:11 -04:00
Victor Porof 9ce7e9c089 Bug 1007203 - Always add categories when pushing to the pseudostack, r=djvj 2014-05-23 17:12:29 -04:00
Victor Porof 07cede5f0b Bug 1004726 - Clean up profiler pseudo-stack representation (relanded), r=djvj,jchen 2014-05-28 18:44:41 -04:00
Victor Porof 9e41feb374 Backed out changeset c2429d6c41fb (Bug 1004726) for regressions on B2G, r=me 2014-05-26 21:51:50 -04:00
Victor Porof 07986ca4cd Bug 1004726 - Clean up profiler pseudo-stack representation. r=djvj,mrosenberg 2014-05-20 15:25:25 -04:00
Brian Smith 43faa7abc2 Bug 1010634, Part 4: Fix signed/unsigned conversion warning in js/ProfilingStack.h, r=luke
--HG--
extra : rebase_source : 7abda28eb58b81fd59a3c7deb2207b22e2075702
2014-05-29 20:54:49 -07:00
Kannan Vijayan dffbe3fd21 Bug 993071 - Add optimization tier info to js profiler pseudostack entries. r=luke 2014-04-11 11:58:55 -04:00
Kannan Vijayan 97de7a7ec6 Bug 993071 - Rename FunctionBoundary IR instructions to ProfilerStackOp. r=luke 2014-04-08 12:16:18 -04:00