mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
profile
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
9e667ccdd2
commit
c100122bf4
1 changed files with 12 additions and 0 deletions
|
|
@ -921,8 +921,16 @@ PersistentRefHolder<ContextRef> createEscargotContext(VMInstanceRef* instance, b
|
|||
return context;
|
||||
}
|
||||
|
||||
#if defined(ESCARGOT_GPERF)
|
||||
#include <gperftools/profiler.h>
|
||||
#endif
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#if defined(ESCARGOT_GPERF)
|
||||
ProfilerStart("profile.log");
|
||||
#endif
|
||||
#ifndef NDEBUG
|
||||
setbuf(stdout, NULL);
|
||||
setbuf(stderr, NULL);
|
||||
|
|
@ -1090,5 +1098,9 @@ int main(int argc, char* argv[])
|
|||
|
||||
Globals::finalize();
|
||||
|
||||
#if defined(ESCARGOT_GPERF)
|
||||
ProfilerStop();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue