Bug 895015 - OdinMonkey: make asm.js entries show up builtin FF profiler (r=bbouvier)

--HG--
extra : rebase_source : b6b5391a1b39b3abeb0f194bfa4ca4a9f54ce90f
This commit is contained in:
Luke Wagner 2013-07-17 17:22:39 -05:00
Родитель 3fadcaa999
Коммит e77c4f0bd7
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -273,8 +273,12 @@ AsmJSActivation::AsmJSActivation(JSContext *cx, AsmJSModule &module)
resumePC_(NULL)
{
if (cx->runtime()->spsProfiler.enabled()) {
// Use a profiler string that matches jsMatch regex in
// browser/devtools/profiler/cleopatra/js/parserWorker.js.
// (For now use a single static string to avoid further slowing down
// calls into asm.js.)
profiler_ = &cx->runtime()->spsProfiler;
profiler_->enterNative("asm.js code", this);
profiler_->enterNative("asm.js code :0", this);
}
prev_ = cx_->runtime()->mainThread.asmJSActivationStack_;

Просмотреть файл

@ -205,6 +205,8 @@ SPSProfiler::pop()
const char*
SPSProfiler::allocProfileString(JSContext *cx, JSScript *script, JSFunction *maybeFun)
{
// Note: this profiler string is regexp-matched by
// browser/devtools/profiler/cleopatra/js/parserWorker.js.
DebugOnly<uint64_t> gcBefore = cx->runtime()->gcNumber;
StringBuffer buf(cx);
bool hasAtom = maybeFun != NULL && maybeFun->displayAtom() != NULL;