gecko-dev/tools/profiler/lul
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
..
AutoObjectMapper.cpp Bug 1361009 - Remove MOZ_WIDGET_GONK from the profiler. r=jseward. 2017-05-08 07:09:33 +10:00
AutoObjectMapper.h Bug 1361009 - Remove MOZ_WIDGET_GONK from the profiler. r=jseward. 2017-05-08 07:09:33 +10:00
LulCommon.cpp Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
LulCommonExt.h Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
LulDwarf.cpp Bug 1356843 - Fix -Wcomma warning in tools/profiler/lul/LulDwarf.cpp. r=jseward 2017-04-09 21:43:29 -07:00
LulDwarfExt.h Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
LulDwarfInt.h
LulDwarfSummariser.cpp Bug 1355136 - LUL on i686/x86_64-linux: allow CFAs to be arbitrary prefix expressions. r=froydnj. 2017-04-12 08:42:02 +02:00
LulDwarfSummariser.h
LulElf.cpp Bug 1339695 (part 10) - Rename SPS_* macros as GP_*. r=jseward. 2017-02-18 00:57:03 +11:00
LulElfExt.h
LulElfInt.h Bug 1339695 (part 10) - Rename SPS_* macros as GP_*. r=jseward. 2017-02-18 00:57:03 +11:00
LulMain.cpp Bug 1374248 - LUL: remove stack scanning. r=njn. 2017-06-19 16:21:59 +02:00
LulMain.h Bug 1374248 - LUL: remove stack scanning. r=njn. 2017-06-19 16:21:59 +02:00
LulMainInt.h Bug 1343557 - Make PfxInstr::operator== const; r=jseward 2017-03-01 15:26:29 -05:00
platform-linux-lul.cpp Bug 1361009 - Remove MOZ_WIDGET_GONK from the profiler. r=jseward. 2017-05-08 07:09:33 +10:00
platform-linux-lul.h Bug 1342306 (part 3) - Properly synchronize the global state in platform*.cpp. r=mstange. 2017-03-08 12:40:39 +11:00