Commit Graph
517 Commits
Author SHA1 Message Date
Nicholas Nethercote 3180c08e92 Bug 1401421 - Remove profiler_get_backtrace_noalloc. r=mstange.
Bug 1385953 removed MemProfiler, which was its only user.
2017-09-20 11:46:26 +10:00
Markus Stange 6902779338 Bug 1395524 - Use AppendFloat when converting the float interval to the env var string. r=njn
MozReview-Commit-ID: GsW9W3aJZTg
2017-08-31 13:36:44 +02:00
Markus Stange 4b31578597 Bug 1395524 - Add profiler log messages for invalid startup profiling env vars. r=njn
MozReview-Commit-ID: ipWVT6Jh3j
2017-08-31 13:34:51 +02:00
Markus Stange 35aeb46b8b Bug 1393046 - Enable JS sampling on the main thread as soon as possible after the profiler has started. r=njn
MozReview-Commit-ID: CIj3GGI3TQo
2017-08-29 19:13:57 +02:00
Tom Ritter 47a13ede33 Bug 1393808 Include immintrin.h under MinGW for _mm_pause() r=njn
MozReview-Commit-ID: H8dxhqk4Uai
2017-08-25 11:55:57 -05:00
Bill McCloskey 91b9d4ac3b Bug 1350432 - Initial Quantum DOM scheduler implementation, disabled by default (r=froydnj)
MozReview-Commit-ID: JWBxz3bwgwD
2017-08-25 10:28:23 -07:00
Michael Layzell 91c6f5cc74 Bug 1388818 - Remove old profiler_suspend_and_sample_thread, r=njn
MozReview-Commit-ID: 4kjGbNi3c7g
2017-08-16 11:44:07 -04:00
Michael Layzell d1ec419fb4 Bug 1386751 - Split CollectCodeLocation into CollectWasmFrame and CollectPseudoEntry, r=njn
MozReview-Commit-ID: 4LNuJQtm95K
2017-08-16 11:44:00 -04:00
Michael Layzell 00f6df52c8 Bug 1365309 - Part 1: Use FramePointerStackWalk when stackwalking from BHR, r=njn
MozReview-Commit-ID: CsMHW5gVmYP
2017-08-14 10:05:24 -04:00
Sylvestre Ledru 832eead9d8 Bug 1387002 - Replace .size() by .empty() when applicable in profiler/ r=njn
MozReview-Commit-ID: 275AVJyhejr
2017-08-03 12:08:04 +02:00
Kan-Ru Chen b4843ed841 Bug 1386495 - Add timeStamp to DOMEventMarkerPayload. r=mstange,smaug
MozReview-Commit-ID: B3b4laxMqQM
2017-08-03 15:42:42 +08:00
Nicholas Nethercote be61ff46f3 Bug 1385197 - Clarify the how and why of JS line number getting in AddPseudoEntry. r=mstange.
The new code preserves the existing behaviour, but it clearer, and gets rid of
two XXX comments.
2017-07-28 17:19:47 +10:00
Wes Kocher 8ad489263c Merge inbound to central, a=merge
MozReview-Commit-ID: 9NFjSEt96iT
2017-08-02 17:11:51 -07:00
Nicholas Nethercote c5d67f0fc9 Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium.
MozStackWalk() is different on Windows to the other platforms. It has two extra
arguments, which can be used to walk the stack of a different thread.

This patch makes those differences clearer. Instead of having a single function
and forbidding those two arguments on non-Windows, it removes those arguments
from MozStackWalk, and splits off MozStackWalkThread() which retains them. This
also allows those arguments to have more appropriate types (HANDLE instead of
uintptr_t; CONTEXT* instead of than void*) and names (aContext instead of
aPlatformData).

The patch also removes unnecessary reinterpret_casts for the aClosure argument
at a couple of MozStackWalk() callsites.
2017-07-27 12:46:47 +10:00
Markus Stange 1b467691a4 Bug 1382928 - Use atomics for thread-shared pieces of state in ThreadResponsiveness.cpp. r=njn
MozReview-Commit-ID: LZJ4XHZPi7N
2017-08-01 15:32:18 -04:00
Markus Stange 3d421cd9a9 Bug 1384688 - Update profile version to 8. r=njn
MozReview-Commit-ID: K8IGUZ3NTRY
2017-07-27 19:11:53 -04:00
Markus Stange fcd9a1ad27 Bug 1384688 - Add a pausedRanges field to the profile JSON of each process which lists time ranges during which the profiler was paused or collecting a profile. r=njn
MozReview-Commit-ID: 6nzt7uHTLVm
2017-07-31 14:44:35 -04:00
Markus Stange c70be7d092 Bug 1384688 - Add an aIsShuttingDown argument to profiler_get_profile() and to profiler_stream_json_for_this_process(). r=njn
When set to true, the resulting profile will have a non-null meta.shutdownTime
field which is set to current time.
Non-shutdown profiles also get that field, but it's null for them.

MozReview-Commit-ID: 1vpmhBR8rC6
2017-07-31 14:23:13 -04:00
Markus Stange f0f7b837f3 Bug 1384688 - Add thread register and unregister time. r=njn
MozReview-Commit-ID: JDRP8m7QrE1
2017-07-28 15:43:19 -04:00
Sebastian Hengst 60cf0371d7 Backed out changeset ed86b892433b (bug 1384688) for bustage at tools/profiler/gecko/nsProfiler.cpp:573: the address of 'thisProcessFirstSampleTime' will always evaluate as 'true'. r=backout 2017-07-31 20:10:32 +02:00
Sebastian Hengst 1d2b4f2187 Backed out changeset e9d92bc3be81 (bug 1384688) 2017-07-31 20:09:57 +02:00
Sebastian Hengst 38cf7829f5 Backed out changeset 399d40cb5c1c (bug 1384688) 2017-07-31 20:09:47 +02:00
Sebastian Hengst 6584a08d00 Backed out changeset 802c36bf1b27 (bug 1384688) 2017-07-31 20:09:41 +02:00
Markus Stange 1614f09573 Bug 1384688 - Update profile version to 8. r=njn
MozReview-Commit-ID: K8IGUZ3NTRY
2017-07-27 19:11:53 -04:00
Markus Stange da2018bdc9 Bug 1384688 - Add a pausedRanges field to the profile JSON of each process which lists time ranges during which the profiler was paused or collecting a profile. r=njn
MozReview-Commit-ID: 6nzt7uHTLVm
2017-07-28 16:40:37 -04:00
Markus Stange 034ae98f77 Bug 1384688 - Add an aIsShuttingDown argument to profiler_get_profile() and to profiler_stream_json_for_this_process(). r=njn
When set to true, the resulting profile will have a non-null meta.shutdownTime
field which is set to current time.
Non-shutdown profiles also get that field, but it's null for them.

MozReview-Commit-ID: 1vpmhBR8rC6
2017-07-31 13:11:19 -04:00
Markus Stange d54af4452c Bug 1384688 - Add thread register and unregister time. r=njn
MozReview-Commit-ID: JDRP8m7QrE1
2017-07-28 15:43:19 -04:00
Markus Stange b69425971f Bug 1384693 - Let callers of profiler_stream_json_for_this_process obtain the time of the first sample in the buffer. r=njn
MozReview-Commit-ID: IRFq1F3dWIk
2017-07-27 15:04:59 -04:00
Carsten "Tomcat" Book 6f750026b1 Merge mozilla-central to mozilla-inbound 2017-07-26 11:16:03 +02:00
Wes Kocher 8b4ccdffcf Merge m-c to autoland, a=merge
MozReview-Commit-ID: F1X8wKqbkg
2017-07-25 19:16:09 -07:00
Nicholas Nethercote a2c9b196e4 Bug 1340721 - Enable profiler stack walking on Windows even for --disable-profiling builds. r=mstange.
On Win32, stack frames are now always present, so we can always use
FramePointerStackWalk(). On Win64, stack frames are never present, so we always
use MozStackWalk().

In both cases, we can get stack traces no matter the value of MOZ_PROFILING. So
this patch removes MOZ_PROFILING from the relevant conditions. It also
restructures the conditions and adds some helpful comments.
2017-07-22 12:04:10 +10:00
Carsten "Tomcat" Book e570da6107 Merge mozilla-central to mozilla-inbound 2017-07-25 14:38:43 +02:00
Nicholas Nethercote 90b2691bae Bug 1380286 (follow-up) - Fix hazard bustage. r=bustage. 2017-07-25 20:16:02 +10:00
Nicholas Nethercote 0e161d798a Bug 1380286 (attempt 2) - Introduce ProfilerStackCollector. r=mstange. 2017-07-25 16:47:14 +10:00
Kan-Ru Chen 8e4a7f5ce0 Bug 1382990 - Change the DOMEventMarkerPayload field name 'type' to 'eventType' to avoid conflicts. r=mstange
MozReview-Commit-ID: BX9nLoCybbG
2017-07-21 17:41:51 +08:00
Markus Stange babfc91655 Bug 1382910 - Add profiler_ensure_started. r=njn
MozReview-Commit-ID: LBLlOLXqCwK
2017-07-24 16:48:15 -04:00
Markus Stange 5f488a7781 Bug 1382910 - Propagate the current profiler state to a newly-launched child process using environment variables. r=njn
This also fixes the bug where we would always profile child processes if the
parent process had been launched with MOZ_PROFILER_STARTUP=1, regardless of
whether the profiler was still running in the parent process.

MozReview-Commit-ID: LkIpYmKJOJ1
2017-07-24 18:16:33 -04:00
Markus Stange 9c67075578 Bug 1382910 - Consistently treat empty env var values the same as the env var not being set. r=njn
This is what prenv.h suggests:
When manipulating the environment there is no way to un-set
an environment variable across all platforms. We suggest
you interpret the return of a pointer to null-string to
mean the same as a return of NULL from PR_GetEnv().

I interpret "null-string" to mean "empty string".

MozReview-Commit-ID: 2mfVD1zULXL
2017-07-20 20:52:20 -04:00
Markus Stange 5bc6c3950b Bug 1382910 - Add a MOZ_PROFILER_STARTUP_FEATURES_BITFIELD environment variable that lets you set the features as a number. r=njn
If set, MOZ_PROFILER_STARTUP_FEATURES_BITFIELD overrides the value set by
MOZ_PROFILER_STARTUP_FEATURES.

This means that we won't need to go through an intermediate string
representation when propagating profiler settings to a child process through
environment variables.

MozReview-Commit-ID: 49eTVMI21GJ
2017-07-24 15:52:04 -04:00
Markus Stange 9dfb34f54a Bug 960153 - Add env var MOZ_PROFILER_STARTUP_FEATURES that lets you select which features should be active for startup profiling. r=njn
MozReview-Commit-ID: 9RzHNgIVcSb
2017-07-20 20:43:19 -04:00
Markus Stange dfb7d6a03b Bug 960153 - Factor out ParseFeaturesFromStringArray. r=njn
MozReview-Commit-ID: JrRecdiMPB0
2017-07-20 14:49:35 -04:00
Markus Stange dc1ee3f7cc Bug 960153 - Add env var MOZ_PROFILER_STARTUP_FILTERS that lets you select which threads should be profiled during startup profiling. r=njn
MozReview-Commit-ID: 3vZy4bn1mRN
2017-07-24 15:40:42 -04:00
Carsten "Tomcat" Book 8f55d543f3 Backed out changeset 3923ce220df3 (bug 1380286) for hazard failures 2017-07-25 08:44:13 +02:00
Nicholas Nethercote 651e69ad04 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.
2017-07-17 10:18:50 +10:00
Steve Fink 264b2dd8df Bug 1380770 - Add more info to GCMinor marker JSON, r=jonco 2017-07-13 17:36:46 -07:00
Nicholas Nethercote 0baec0c0b2 Bug 1379933 (part 5) - Tweak ProfileBuffer arguments. r=mstange.
This patch changes ProfileBuffer arguments from pointers to references. For
functions that modify the ProfileBuffer, it also moves the argument to the end.
2017-07-13 11:05:34 +10:00
Nicholas Nethercote 8970534745 Bug 1379933 (part 4) - Start all ProfilerBuffer methods with an upper case letter. r=mstange. 2017-07-13 11:05:31 +10:00
Nicholas Nethercote 8d846b4fa5 Bug 1379933 (part 3) - Start all ProfilerBufferEntry methods with an upper case letter. r=mstange.
Also, hasKind() can be removed.
2017-07-13 11:05:29 +10:00
Nicholas Nethercote ff88750116 Bug 1379933 (part 2) - Improve ProfileBuffer's handling of labels and dynamic strings. r=mstange.
When a sample with a label and a dynamic string is written to the
ProfileBuffer, the profiler currently joins them together (up to a max length
of 512, omitting any that exceed this) and then writes a CodeLocation entry
with an empty string followed by a sequence of EmbeddedString entries. When
parsing those entries, we allow a length up to 8192, but that limit is never
reached due to the prior limit of 512.

This patch makes the following changes.

- Removes the joining at write time. Labels and dynamic strings are now written
  separately into the ProfileBuffer. The 512 limit still applies, but just for
  dynamic strings; dynamic strings longer than that are replaced with "(too
  long)". (Labels also always take up one entry, because they only require a
  single pointer, because they are always static strings.) The joining is
  now done when the ProfileBuffer is parsed, and the max length for the joined
  string is still 512; any strings exceeding 512 at that point are truncated,
  rather than omitted. (This also happens to be outside the profier's critical
  section.)

- Renames CodeLocation as Label and EmbeddedString as DynamicStringFragment.
  This makes the ProfileBuffer entry names better match the names used in
  GeckoProfiler.h.

- Moves AddDynamicCodeLocation(), now called addDynamicStringEntry(), into
  ProfileBuffer.

- Adds some testing of long and overly-long dynamic strings to the GTest.
2017-07-13 11:05:27 +10:00
Nicholas Nethercote 7ed9980450 Bug 1379933 (part 1) - Remove Sample entries from the ProfileBuffer. r=mstange.
They serve no useful purpose.
2017-07-11 20:12:24 +10:00