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

59 Коммитов

Автор SHA1 Сообщение Дата
Julian Seward 15bcf2d929 Bug 1584976 - LUL on x86_64-{android, linux}: accept .eh_frame with type as either SHT_PROGBITS or SHT_X86_64_UNWIND. r=mstange.
The LUL unwinder on x86_64-android and x86_64-linux tries to read Dwarf unwind
information from the ELF section named ".eh_frame", and expects the section to
have type SHT_PROGBITS.  It appears that that section might instead have the
type SHT_X86_64_UNWIND, possibly as a result of recent toolchain (linker?)
changes.  This patch tracks that change.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 16:26:09 +00:00
Makoto Kato c4cb964c8e Bug 1572613 - Use frame pointer based stack walker even if Android/x86 and Android/x86-64. r=jseward
Actually, we use clang for all Linux and Android platform, so it is no reason to use frame pointer based stack walker for LUL on Android/x86 and Android/x86-64 if no DWARF rule.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:34:29 +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
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Makoto Kato e2bc97ef28 Bug 1525498 - Use frame pointer to walk stack on aarch64 when no rule set. r=jseward
Some system libraries such as libart.so doesn't have CFI, so I want to add
stack walker that uses frame pointer when no rule set, like x86/x86-64.

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

--HG--
extra : rebase_source : 4c8edef9a02d6fdb213e3a78731631ee0703650f
2019-02-07 13:38:55 +09:00
Makoto Kato 74e2bc67b3 Bug 1518716 - Define platform macros such as GP_OS_android for Android/x86-64. r=jseward
Bug 1518557 is landed, but GP_OS_android and etc aren't defined in tools/profiler/core/PlatformMacros.h. It means that
Gecko Profile might not resolve symbols in libxul.so.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 12:46:59 +00:00
Gerald Squelart 0af4548b10 Bug 1520103 - Fixed non-unified Profiler build - r=mstange
Found issues by forcing a local non-unified build.

Also sorted #includes by logical groups (from most local to most global), and
alphabetically within groups.

Depends on D18621

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

--HG--
extra : moz-landing-system : lando
2019-02-07 17:35:37 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Mike Hommey d2a1113cc2 Bug 1480706 - Enable Frame-pointer chasing on x86. r=sewardj 2018-08-08 18:26:04 +09:00
Julian Seward 3af306752a Bug 1469410 - UBSan false positive at tools/profiler/lul/LulMain.cpp:910:57. r=froydnj.
--HG--
extra : rebase_source : 3a5edbd2543fb8330cc1dcb4ffefce8430d2f0b5
2018-06-22 10:03:06 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02: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
Julian Seward 5c0c6834f5 Bug 1456382 - LUL: Convert mAdminThreadId check to MOZ_RELEASE_ASSERT. r=njn.
LUL::mAdminThreadId is used only to assert that certain calls into the LUL
object are made on the correct thread.  Because those assertions are done
using MOZ_ASSERT, some compilers spot that LUL::mAdminThreadId is unused in
non-debug builds, emit a warning to that effect, and then cause the build to
fail due to the presence of -Werror.

Given that (1) it's unlikely that people will use the profiler in debug
builds, (2) failure of these assertions is likely to lead to deadlocking or
crashing in the profiler, and (3) they don't occur on high-frequency paths,
a good solution seems to be to convert them to MOZ_RELEASE_ASSERTs, hence
causing LUL::mAdminThreadId to be used in even in non-debug builds.

In some cases, related MOZ_ASSERTs relating to LUL::mAdminMode have also
been upgraded to MOZ_RELEASE_ASSERTs, for consistency with the
LUL::mAdminThreadId changes.

--HG--
extra : rebase_source : 554a31060a828db01246ece6d1e3afbcc0b42cd2
2018-04-26 19:08:23 +02:00
Nathan Froyd 60e1125026 Bug 1448027 - make constructors in the profiler explicit; r=mstange
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
arthur.iakab c4dd80eca3 Merge mozilla-central to autoland 2018-01-31 00:41:58 +02:00
Jim Chen 149e502c72 Bug 1428182 - 7. Include <link.h> in LUL for Android; r=jseward
Modern NDK headers all have <link.h>, so we should always include it,
and still provide shims for anything we need that's not defined in
<link.h>.

MozReview-Commit-ID: GNBDIe73RFm

--HG--
extra : rebase_source : 1246dce8a7ad201cf4f01de8e4912217636f1fc8
2018-01-30 14:08:23 -05:00
Makoto Kato 7b895ca1a7 Bug 1433775 - Add Linux/arm support to Gecko Profiler. r=mstange
We don't support Android for Gecko Profiler extension yet.

So for investigating arm issue, I would like to add initial support of
Gecko Profiler for Linux/arm.

--HG--
extra : rebase_source : f936a97a87b7eea2ebfefe3cbc7f8791bc90d03a
2018-01-29 18:01:23 +09:00
Cosmin Sabou c6a0d55423 Backed out 11 changesets (bug 1428182) for build bustages on pixman-inlines.h:29:10 on a CLOSED TREE
Backed out changeset 84c767de6202 (bug 1428182)
Backed out changeset 429433caa78c (bug 1428182)
Backed out changeset c576e9d1f68f (bug 1428182)
Backed out changeset 092662eab5eb (bug 1428182)
Backed out changeset 4dd7eaff3ab5 (bug 1428182)
Backed out changeset fbbb0745b139 (bug 1428182)
Backed out changeset 1d1278b289b7 (bug 1428182)
Backed out changeset 55891ffb3768 (bug 1428182)
Backed out changeset 4655e1b1b237 (bug 1428182)
Backed out changeset 377eada51b3c (bug 1428182)
Backed out changeset 17c0e373d921 (bug 1428182)

--HG--
rename : ipc/chromium/src/third_party/libevent/patches/android-api-level.patch => ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch
2018-01-30 01:22:33 +02:00
Jim Chen 80635d981e Bug 1428182 - 7. Include <link.h> in LUL for Android; r=jseward
Modern NDK headers all have <link.h>, so we should always include it,
and still provide shims for anything we need that's not defined in
<link.h>.

MozReview-Commit-ID: GNBDIe73RFm

--HG--
extra : rebase_source : f1f2eddc73dc1accb3a1eb8445600b015e9e7d52
2018-01-29 17:38:14 -05:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Julian Seward 8e4cb88b72 Bug 1415782 - [clang 5 ASAN] LulIntegration.unwind_consistency | Value of: nTestsPassed == nTests (part 2 of 2). r=glandium.
Fixes the LUL unwind test cases (viz, gtest LulIntegration.unwind_consistency)
when built with Clang 5.

* Increases the test stack size, LUL_UNIT_TEST_STACK_SIZE, from 16KB to
  32KB, since 16KB is gives inadequate margin for the test cases used, and
  is actually too small when with building with ASan enabled.

* In the generated test functions, uses write() calls that do nothing to
  ensure that Clang cannot optimise away the space[] array that is used to
  give different frame sizes to the different test functions.  Without
  these, Clang 5 optimises out this array and that causes all the unwind
  tests to fail.

--HG--
extra : rebase_source : 9d91ea9b08e6771facf7a788163d67f1871f5948
2017-11-21 18:11:46 +01:00
Julian Seward d9619fa122 Bug 1415782 - [clang 5 ASAN] LulIntegration.unwind_consistency | Value of: nTestsPassed == nTests (part 1 of 2). r=njn.
Adds minimal support for reading DWARF CFI pertaining to version 4 of the
standard.  Dwarf 4 CFI appears to have become the default used by Clang
version 5.  There are two changes:

* Accepts cie->version == 4.

* For version 4 CIEs, skips over the two new fields address_size and
  segment_size, but ensures that segment_size is zero.  Adds comments in
  ReadFDEFields about what to do if we ever find a case where segment_size
  is nonzero.

This is in no way full or complete Dwarf 4 support, but it is enough to get
LUL working again with Clang 5 compiled code.

--HG--
extra : rebase_source : f4e21ae5b8d0f219a360d14cc242b2aa812056a0
2017-11-21 18:10:16 +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
Sylvestre Ledru 514cedaafc Bug 1414636 - Rename the 'register' variable to silent a warning r=jseward
MozReview-Commit-ID: 7gUn991qRzI

--HG--
extra : rebase_source : 1298b4c6c4f2e99be0e114aa19a70b2d9725cc61
2017-11-05 17:31:09 +01:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Julian Seward 7eda9d1a96 Bug 1374248 - LUL: remove stack scanning. r=njn.
This removes LUL's ability to recover frames by the heuristic mechanism of
stack scanning.  Stack scanning is a last-ditch way to try to recover the
unwind when all other methods (metadata-based, frame-pointer chasing) have
failed, by scanning back up the stack and looking for the first word that
could plausibly be a return address.  It often mis-identifies return addresses
because it has no way to distinguish live ones from dead ones that have not
been overwritten, and very often causes the unwind to fail as a result.

In any case LUL's stack scanning ability has actually been switched off (by
the parameters passed to LUL::Unwind) for some considerable time now, so this
change should make no observable difference to behaviour.  Specific changes:

In LUL::Unwind():

* Removes formal parameters |scannedFramesAcquired| and |scannedFramesAllowed|

* Removes code that does stack scanning

* Simplifies control flow in the main unwind loop, so that loop now
  has the easier-to-follow structure

  while (true) {
    // preliminary stuff

    if (CFI data available for current PC) {
       do CFI step;
       continue;
    }

    if (FP chasing possible for current PC) {
       do FP step;
       continue;
    }

    // give up
    break;
  }

* Moves two #ifdefs upwards to enclose the comments pertaining to them, as
  well as the code.  This makes the top level structure easier to follow.  The
  corresponding #endifs are likewise commented with the condition.

From class LULStats, removes |mScanned|.

Removes PriMap::MaybeIsReturnPoint() entirely.  This is a heuristic helper
only used by stack scanning.

In all, 395 lines of code are removed, according to hg diff --stat.

--HG--
extra : rebase_source : 5ffa73c64923149a58df3228cf940cb539f8f707
2017-06-19 16:21:59 +02:00
Tom Tromey 3b237f38d8 Bug 1370786 - use UniquePtr for SecMap in LUL; r=froydnj
This avoids a memory leak.

MozReview-Commit-ID: LmZdWd6ym56

--HG--
extra : rebase_source : 5bc8a267160565153a833487453f17771ceab917
2017-06-07 11:40:24 -06:00
Nicholas Nethercote 5d0d883f35 Bug 1361009 - Remove MOZ_WIDGET_GONK from the profiler. r=jseward.
This removes the need for PROFILER_LIKELY_MEMORY_CONSTRAINED.

The patch also removes PROFILE_JAVA, USE_FAULTY_LIB, CONFIG_CASE_1,
CONFIG_CASE_2 and replaces all their uses with GP_OS_linux or GP_OS_android.

Finally, the patch removes a bogus |defined(GP_OS_darwin)| condition in
platform-linux-lul.cpp.

--HG--
extra : rebase_source : 77d1c625d65ddf551ab8cd4b962ae48c1a54466c
2017-05-08 07:09:33 +10:00
Julian Seward 62e5c659b4 Bug 1357777 - LUL on x86_64-linux: recover frames by following the frame pointer chain. r=froydnj,jandem.
On x86_64-Linux, LUL currently can only unwind frames for which CFI unwind data
is available.  This causes a noticeable number of junk samples in the profiler,
characterised by failures at transition points between JIT and native frame
sequences.  This patch allows LUL to try recovering the previous frame using
frame pointer chasing in the case where CFI isn't present.  This allows LUL to
unwind through or jump over interleaved JIT frames, because, respectively:

* The baseline JIT produces frame-pointerised code.

* If the profiler is enabled, IonMonkey doesn't produce frame-pointerised code,
  but also doesn't change the frame pointer register value.  It can use the
  frame pointer if profiling is disabled, but that's irrelevant here.

The patch also adds counts of FP-recovered frames to LUL's statistics printing,
to make it possible to assess how often this feature is used.

--HG--
extra : rebase_source : eadc54393788693b0e3f8d5129d48aaaad143a0b
2017-04-25 08:14:23 +02:00
Chris Peterson f7d9d18c1b Bug 1356843 - Fix -Wcomma warning in tools/profiler/lul/LulDwarf.cpp. r=jseward
clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements.

tools/profiler/lul/LulDwarf.cpp:604:15: warning: possible misuse of comma operator here [-Wcomma]

MozReview-Commit-ID: 6ZP79hgtrAD

--HG--
extra : rebase_source : 77028600c713aa3235c3729a5db7be0290df57e4
extra : source : e4536bbeb28050b38979a05b379f13eb4a12beee
2017-04-09 21:43:29 -07:00
Julian Seward 5e2ec6a4bc Bug 1356215 - LUL: increase size of unwound stack to 160k. r=froydnj.
For reasons related to the architecture of the Gecko Profiler in previous years,
which are no longer relevant, LUL will only unwind through the first 32KB of
stack.  This is mostly harmless, since most stacks are smaller than 4KB, per
measurements today, but occasionally they go above 32KB, causing unwinding to
stop prematurely.

This patch changes the max size to 160KB, and documents the rationale for
copying the stack and unwinding, rather than unwinding in place.  160KB is big
enough for all stacks observed in several minutes of profiling all threads at
1KHz.

--HG--
extra : rebase_source : a1d5526aff50345be8b965c2b6b01c66b40fd0d8
2017-04-18 10:30:14 +02:00
Julian Seward 0187151352 Bug 1355136 - LUL on i686/x86_64-linux: allow CFAs to be arbitrary prefix expressions. r=froydnj.
For reasons which are unclear, but possibly due to lack of any known use cases
when the code was written, LUL on i686/x86_64-linux only accepts CFA (canonical
frame address) expressions of the form SP+offset or FP+offset.  However, on
Fedora 25 x86_64 and Ubuntu 16.10 x86_64, at least one address range per object
uses a Dwarf expression for the CFA, for example:

00000018 000000000024 0000001c FDE cie=00000000 pc=0000000031e0..0000000031f0
  DW_CFA_def_cfa_offset: 16
  DW_CFA_advance_loc: 6 to 00000000000031e6
  DW_CFA_def_cfa_offset: 24
  DW_CFA_advance_loc: 10 to 00000000000031f0
  DW_CFA_def_cfa_expression(
          DW_OP_breg7 (rsp): 8; DW_OP_breg16 (rip): 0; DW_OP_lit15; DW_OP_and;
          DW_OP_lit11; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus)

producing the following complaint from LUL:

  can't summarise: SVMA=0x31f0: rule for DW_REG_CFA: invalid |how|, expr=LExpr(PFXEXPR,0,0)

Given that LUL is capable of handling such a CFA expression, it seems artificial
to stop it doing so.  This patch changes Summariser::Rule() so as to allow such
expressions.
2017-04-12 08:42:02 +02:00
Julian Seward 553b8e9b10 Bug 1354546 - Make LUL read CFI from the main executable on x86_64-Linux. r=n.nethercote.
LUL doesn't read CFI from the main executable on x86_64-linux, and possibly
other Linux variants, because SharedLibraryInfo::GetInfoForSelf() doesn't
produce a name for the main executable object, even though it does notice the
mapping.

This causes noticeable unwind breakage because the main executable on Linux
contains various wrapper functions pertaining to memory allocation and locking,
such as

  moz_xmalloc, moz_xcalloc, moz_xrealloc
  mozilla::detail::MutexImpl::lock, mozilla::detail::MutexImpl::unlock

and is generally observable on x86_64-Linux as unwinding failures out of
functions with addresses around 0x40xxxx, since that's the traditional load
address for the main executable.

This patch modifies the Linux implementation of GetInfoForSelf() so as to
harvest the main executable's name from /proc/self/maps.  This is then added
into the information acquired from dl_iterate_phdr.  As a result
GetInfoForSelf() does correctly report the executable name, so LUL reads Dwarf
unwind info from it, and the abovementioned unwinding failures disappear.

--HG--
extra : rebase_source : 267c6d7c3967a4d29f8ff0b4a91d339a6625085d
2017-04-12 07:56:58 +02:00
Nicholas Nethercote f1d3df720c Bug 1346132 (part 3) - Remove the profiler's bespoke logging system in favour of MOZ_LOG. r=erahm,jseward.
The profiler will use level 3 (Info) and 4 (Debug) logging, though this patch
only uses level 3. LUL will use level 5 (Verbose) debugging.

The patch also tweaks parts of the the usage message, including adding
MOZ_PROFILER_{STARTUP,SHUTDOWN} to it.

--HG--
extra : rebase_source : f43a023912fbce993ed367cdd26b8f25f25381de
2017-03-14 16:49:12 +11:00
Markus Stange 4be87b17a8 Bug 1329111 - Supply SharedLibraryInfo with the absolute module path and debug path on all platforms. r=marco
MozReview-Commit-ID: 9R3ecPxGoMr

--HG--
extra : rebase_source : 3cc2af0e5c2b40f349f9e77e06731188d9af07ea
2017-03-14 18:26:50 -04:00
Sebastian Hengst 224e25992e Backed out changeset 2656a5fa88a2 (bug 1329111) 2017-03-16 19:59:53 +01:00
Markus Stange 13cdaa1908 Bug 1329111 - Supply SharedLibraryInfo with the absolute module path and debug path on all platforms. r=marco
MozReview-Commit-ID: 9R3ecPxGoMr

--HG--
extra : rebase_source : 3cc2af0e5c2b40f349f9e77e06731188d9af07ea
2017-03-14 18:26:50 -04:00
Dan Minor 52f0cc6d8b Bug 1343557 - Make PfxInstr::operator== const; r=jseward
MozReview-Commit-ID: 5WpBNHbqz0q

--HG--
extra : rebase_source : 04a53887c9542cdafbb5d837090a62dd56a1333d
2017-03-01 15:26:29 -05:00
Nicholas Nethercote d5457902e2 Bug 1342306 (part 3) - Properly synchronize the global state in platform*.cpp. r=mstange.
This patch properly synchronizes all the global state in platform*.cpp, which
gets us a long way towards implementing bug 1330184.

- Most of the global state goes in a new class, ProfilerState, with a single
  instance, gPS. All accesses to gPS are protected by gPSMutex. All functions
  that access ProfilerState require a token proving that gPS is locked; this
  makes things much clearer.

  gRegisteredThreadsMutex is removed because it is subsumed by gPSMutex.

- gVerbosity, however, does not go in ProfilerState. It stays separate, and
  gains its own mutex, gVerbosityMutex.

Also, the tracking of the current profiler state is streamlined. Previously it
was tracked via:

- stack_key_initialized, gInitCount, gSampler, gIsProfiling, gIsActive, and
  gIsPaused.

Now it is tracked via:

- gPS, gPS->sActivity, and gPS->mIsPaused.

This means that the Sampler class is no longer necessary, and the patch removes
it.

Other changes of note made by the patch are as follows.

- It removes ThreadInfo::{mMutex,GetMutex}. This mutex was only used in two
  places, and both these are now protected by gPSMutex.

- It tweaks the LOG calls. All the main functions (init(), shutdown(), start(),
  stop()) now do consistent BEGIN/END logging, and a couple of other low-value
  incidental LOG calls have been removed.

- It adds a lot of release assertions requiring that gPS be initialized (e.g.
  profiler_init() has been called but profiler_shutdown() has not).

- It uses alphabetical order for everything involving profiler feature names.

- It removes Platform{Start,Stop}() and SamplerThread::{Start,Stop}Sampler().
  These are no longer necessary now that SamplerThread::sInstance has been
  replaced with ProfilerState::mSamplerThread which allows more direct access
  to the current SamplerThread instance.

- It removes PseudoStack::mPrivacyMode. This was derived from the "privacy"
  feature, and we now use gPS->mFeaturePrivacy directly, which is simpler.
  It also replaces profiler_in_privacy_mode() with
  profiler_is_active_and_not_in_privacy_mode(), which avoids an unnecessary
  lock/unlock of gPSMutex on a moderately hot path.

Finally, the new code does more locking than the old one. A number of operation
The following operations now lock a mutex when they previously didn't; the
following are ones that are significant, according to some ad hoc profiling.

- profiler_tracing()
- profiler_is_active()
- profiler_is_active_and_not_in_privacy_mode()
- profiler_add_marker()
- profiler_feature_active()
- SamplerThread::Run() [when the profiler is paused]

All up this roughly doubles the amount of mutex locking done by the profiler.
It's probably possible to avoid this increase by allowing careful unlocked
access to three of the fields in ProfilerState (mActivityGeneration,
mFeaturePrivacy, mStartTime), but this should only be done as a follow-up if
the extra locking is found to be a problem.

--HG--
extra : rebase_source : c2e41231f131b3e9ccd23ddf43626b54ccc77b7b
2017-03-08 12:40:39 +11:00
Nicholas Nethercote 4b44b699f4 Bug 1339695 (part 10) - Rename SPS_* macros as GP_*. r=jseward.
This removes the final mentions of the old "SPS" name.

--HG--
extra : rebase_source : 1bb36686d21ff8376326d35416b497f58e03fcde
2017-02-18 00:57:03 +11:00
Marco Castelluccio 3aec408e65 Bug 1330833 - Add the new "modules" (DLLs) ping type. r=Dexter,mstange,jorendorff, data-review=bsmedberg 2017-02-18 14:17:30 +00:00
Wes Kocher 4fb32a5a83 Backed out 2 changesets (bug 1330833) for windows 64 xpcshell failures a=backout
Backed out changeset 466565fa382a (bug 1330833)
Backed out changeset 927194e7769d (bug 1330833)

MozReview-Commit-ID: GB4KsH29xYC
2017-02-16 17:20:54 -08:00
Marco Castelluccio fb547d31c7 Bug 1330833 - Add the new "modules" (DLLs) ping type. r=Dexter,mstange,jorendorff, data-review=bsmedberg 2017-02-16 17:09:32 +00:00
Nicholas Nethercote 0b2102e7db Bug 1339695 (part 3) - Introduce USE_FAULTY_LIB. r=jseward.
This factors out some common preprocessor conditions.

--HG--
extra : rebase_source : 444ce4fbccdeb130c604ed12e36ea9c6496a3c85
2017-02-15 16:24:35 +11:00
Nicholas Nethercote 8eb85b796e Bug 1339695 (part 1) - Remove LUL_{ARCH,OS,PLAT}_* macros. r=jseward.
They duplicate the equivalent SPS_* macros. (The SPS_* macros have already
crept into use in some places within LUL.)

--HG--
extra : rebase_source : 65ed6e6e147189814511b0ca38342fec118478b9
2017-02-15 16:13:01 +11:00
Nicholas Nethercote 74eeaa5980 Bug 1339327 (part 4) - Rename some globals in the profiler. r=mstange.
The 'g' prefix is for global variables. The 's' prefix is for static class
members.
2017-02-15 14:26:23 +11:00
Nicholas Nethercote d6624d0e50 Bug 816598 - Add a memory reporter for the Gecko Profiler. r=mstange,jseward.
It's fairly straightforward, and measures the important parts of:

- Sampler, PseudoStack, ProfileBuffer, ThreadInfo.

- LUL, PriMap, SecMap

Coverage isn't perfect, but it gets the major things I found via DMD on Linux.

Example output in about:memory:

├──151.21 MB (49.73%) -- profiler
│  ├──141.49 MB (46.53%) ── lul
│  └────9.72 MB (03.20%) ── sampler

--HG--
extra : rebase_source : 67d2ada42aead43f68f5100a08204a1d1f1cfceb
2017-01-30 12:37:26 +11:00
Julian Seward eed29460b1 Bug 1245477 - Crashes in lul::DerefTUW. r=nfroyd.
--HG--
extra : rebase_source : 647ea253f987720f3a641f382426de3d8ad1d1d4
2017-02-06 09:03:38 +01:00
Nicholas Nethercote cb7d796cb1 Bug 1333296 (part 3) - Remove SPS mentions in tools/profiler. r=mstange.
--HG--
extra : rebase_source : d4ee3eccbffc86ea902be2b80a159fb84445c027
2017-01-24 14:18:50 +11:00