| Index: src/full-codegen.cc
|
| ===================================================================
|
| --- src/full-codegen.cc (revision 12182)
|
| +++ src/full-codegen.cc (working copy)
|
| @@ -37,6 +37,7 @@
|
| #include "scopes.h"
|
| #include "scopeinfo.h"
|
| #include "stub-cache.h"
|
| +#include "third_party/vtune/vtune-jit.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -303,6 +304,10 @@
|
| masm.positions_recorder()->StartGDBJITLineInfoRecording();
|
| #endif
|
|
|
| +#ifdef ENABLE_VTUNE_JIT_INTERFACE
|
| + masm.positions_recorder()->StartVtuneJITLineInfoRecording();
|
| +#endif
|
| +
|
| FullCodeGenerator cgen(&masm, info);
|
| cgen.Generate();
|
| if (cgen.HasStackOverflow()) {
|
| @@ -339,6 +344,24 @@
|
| GDBJIT(RegisterDetailedLineInfo(*code, lineinfo));
|
| }
|
| #endif
|
| +#ifdef ENABLE_VTUNE_JIT_INTERFACE
|
| +if (VTUNERUNNING) {
|
| + if (!code.is_null()) {
|
| + VtuneJITLineInfo* vtunelineinfo =
|
| + masm.positions_recorder()->DetachVtuneJITLineInfo();
|
| +
|
| + VTUNEJIT(RegisterDetailedLineInfo(*code, vtunelineinfo));
|
| + }
|
| + if (!info->shared_info().is_null()) {
|
| + Handle<SharedFunctionInfo> shared = info->shared_info();
|
| + if (shared->DebugName()->IsString())
|
| + VTUNEJIT(AddCode(Handle<String>(shared->DebugName()), code, script));
|
| + else
|
| + VTUNEJIT(AddCode(Handle<String>(), code, script));
|
| + }
|
| +}
|
| +#endif
|
| +
|
| return !code.is_null();
|
| }
|
|
|
|
|