Commit Graph
59 Commits
Author SHA1 Message Date
Nicholas Nethercote a47be2a53a 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.
2017-06-02 17:16:56 +10:00
Nicholas Nethercote 81be84215b 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.
2017-06-02 12:46:09 +10:00
Nicholas Nethercote 28a25e066c 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().
2017-05-26 14:54:31 +10:00
Nicholas Nethercote 4ec5b633e2 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 df71128496 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.
2017-05-26 09:37:28 +10:00
Nicholas Nethercote e6089b3411 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 592baf4201 Merge mozilla-central to mozilla-inbound 2017-04-26 09:04:59 +02:00
Nicholas Nethercote b2c96e3507 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!)
2017-04-26 14:32:26 +10:00
Tom Tromey 779bb3d8df 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
2017-03-22 13:57:31 -06:00
Markus Stange 7dc30cc736 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
2017-03-22 19:37:33 -04:00
Boris Zbarsky e3d6f3c0a4 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 6c7787df36 Backed out changeset c1978f7d49c4 for build failures.
MozReview-Commit-ID: FOwcGtykkXR
2017-03-11 00:10:36 -05:00
Boris Zbarsky 09244ad037 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 ce23eac1f4 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.
2017-01-25 09:08:15 +11:00
Jon Coppeard 25973c4e78 Bug 1298639 - Use bytecode offsets rather than direct pointer in profiling API r=shu 2016-09-13 14:06:46 +02:00
Nick Fitzgerald 017e57117a Bug 1296399 - Make sure that the js::ProfileEntry::Flags fit in the type that they are used with. r=shu 2016-08-18 12:35:00 -04:00
Jan de Mooij bd0f1c9018 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Jon Coppeard 99c5d8b980 Bug 1259180 - Compact arenas containing scripts r=terrence 2016-04-13 10:03:44 +01:00
Victor Porof fc6cf42589 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 b17c143421 Bug 912121 - Update misc. DevTools paths and comments. rs=devtools 2015-09-21 12:07:31 -05:00
Nick Fitzgerald 118780b1d4 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 9af8fa2bea Bug 1204613 - Add a static_assert that ProfileEntry::{Flags,Category} do not overlap; r=djvj 2015-09-14 11:57:00 +02:00
Nick Fitzgerald b7d629abb7 Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj 2015-09-14 12:15:12 -07:00
Nigel Babu f7505d8e3d Backed out changeset 3fac2976a472 (bug 1204168) for build bustage
CLOSED TREE
2015-09-14 22:11:51 +05:30
Nick Fitzgerald e25c938a19 Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj 2015-09-14 09:19:59 -07:00
Benoit Girard f08c935552 Bug 1172186 - Make the profiler build standalone. r=mstange 2015-06-18 01:05:42 -04:00
Victor Porof abf0920a22 Bug 1167300 - Consolidate the performance tool directory, r=jsantell 2015-05-22 16:25:52 -04:00
Jan de Mooij c6596c5fa8 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 1a1c158706 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 369ef1b850 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 90898b1eb4 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 91b7bfd47c Bug 1111290 - Part 2: Non-mechanical changes. r=waldo 2015-01-26 07:22:08 +09:00
Kannan Vijayan 29b4a7edb7 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 fcf236fa16 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 8bd41607a8 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 bae0a32948 Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Dan Gohman 2bf0b05ad8 Bug 1054334 - SpiderMonkey: Delete unneeded semicolons r=nbp 2014-08-18 12:20:39 -07:00
Victor Porof 61420cf650 Bug 879008 - New UI for the sampling Profiler, r=rcampbell,fitzgen,pbrosset 2014-08-06 11:25:18 -04:00
Luke Wagner 88b7a64f50 Bug 1040390 - Integrate JS::ProfilingFrameIterator with the profiler (r=bgirard) 2014-07-29 09:56:22 -05:00
Victor Porof 40f4cc8d75 Bug 1017790 - Expose category information in the profiler data, r=djvj 2014-06-04 14:37:49 -04:00
Victor Porof 89ba044898 Bug 1019182 - ProfileEntry flags should be zeroed when setting frame data, r=djvj 2014-06-04 14:37:49 -04:00
Phil Ringnalda 83a48cca6a Merge f-t to m-c 2014-05-31 20:31:07 -07:00
Victor Porof 0738be59d5 Bug 1007203 - Set the categories as flags on profile entries, r=djvj 2014-05-30 21:41:11 -04:00
Victor Porof 298ca2ed1b Bug 1007203 - Always add categories when pushing to the pseudostack, r=djvj 2014-05-23 17:12:29 -04:00
Victor Porof a146e94b1d Bug 1004726 - Clean up profiler pseudo-stack representation (relanded), r=djvj,jchen 2014-05-28 18:44:41 -04:00
Victor Porof f6468922db Backed out changeset c2429d6c41fb (Bug 1004726) for regressions on B2G, r=me 2014-05-26 21:51:50 -04:00
Victor Porof a7cd03cf3f Bug 1004726 - Clean up profiler pseudo-stack representation. r=djvj,mrosenberg 2014-05-20 15:25:25 -04:00
Brian Smith d4e297554b Bug 1010634, Part 4: Fix signed/unsigned conversion warning in js/ProfilingStack.h, r=luke 2014-05-29 20:54:49 -07:00
Kannan Vijayan 762ac034ea Bug 993071 - Add optimization tier info to js profiler pseudostack entries. r=luke 2014-04-11 11:58:55 -04:00
Kannan Vijayan 8422e33d07 Bug 993071 - Rename FunctionBoundary IR instructions to ProfilerStackOp. r=luke 2014-04-08 12:16:18 -04:00