зеркало из https://github.com/mozilla/gecko-dev.git
Make JP_FIRST work with JP_RTC_HZ. Bug 367675, r=dbaron
This commit is contained in:
Родитель
ebb4627900
Коммит
2ec057980b
|
@ -64,7 +64,7 @@ which have the following meanings:
|
|||
one (with <code>kill -PROF</code>, or with <code>kill -ALRM</code> if
|
||||
JP_REALTIME is used, or with <code>kill -POLL</code> (also known as <code>kill -IO</code>) if JP_RTC_HZ is used).
|
||||
|
||||
<li> <b>JP_FIRST=x</b> : Wait x seconds before starting the timer. This doesn't work with JP_RTC_HZ yet. See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=367675">bug 367675</a>.
|
||||
<li> <b>JP_FIRST=x</b> : Wait x seconds before starting the timer
|
||||
|
||||
<li> <b>JP_PERIOD=y</b> : Set timer to interrupt every y seconds. Only
|
||||
values of y strictly greater than 0.001 are supported.
|
||||
|
|
|
@ -386,6 +386,8 @@ NS_EXPORT_(void) setupProfilingStuff(void)
|
|||
if (rtc) {
|
||||
#if defined(linux)
|
||||
rtcHz = atol(rtc+10);
|
||||
timerMiliSec = 0; /* This makes JP_FIRST work right. */
|
||||
realTime = 1; /* It's the _R_TC and all. ;) */
|
||||
|
||||
#define IS_POWER_OF_TWO(x) (((x) & ((x) - 1)) == 0)
|
||||
|
||||
|
@ -431,7 +433,9 @@ NS_EXPORT_(void) setupProfilingStuff(void)
|
|||
"profiling\n", stderr);
|
||||
return;
|
||||
}
|
||||
} else
|
||||
}
|
||||
|
||||
if (!rtcHz || firstDelay != 0)
|
||||
#endif
|
||||
if (realTime) {
|
||||
sigaction(SIGALRM, &action, NULL);
|
||||
|
@ -459,7 +463,11 @@ NS_EXPORT_(void) setupProfilingStuff(void)
|
|||
|
||||
if(startTimer) {
|
||||
#if defined(linux)
|
||||
if (rtcHz) {
|
||||
/* If we have an initial delay we can just use
|
||||
startSignalCounter to set up a timer to fire the
|
||||
first stackHook after that delay. When that happens
|
||||
we'll go and switch to RTC profiling. */
|
||||
if (rtcHz && firstDelay == 0) {
|
||||
puts("Jprof: enabled RTC signals");
|
||||
enableRTCSignals(true);
|
||||
} else
|
||||
|
|
Загрузка…
Ссылка в новой задаче