Index: src/compiler.cc |
=================================================================== |
--- src/compiler.cc (revision 12182) |
+++ src/compiler.cc (working copy) |
@@ -46,6 +46,7 @@ |
#include "scopeinfo.h" |
#include "scopes.h" |
#include "vm-state-inl.h" |
+#include "third_party/vtune/vtune-jit.h" |
namespace v8 { |
namespace internal { |
@@ -370,6 +371,10 @@ |
if (optimized_code.is_null()) return AbortOptimization(); |
info()->SetCode(optimized_code); |
RecordOptimizationStats(); |
+ Handle<String> name = info()->function()->debug_name(); |
+ VTUNEJIT(AddCode(Handle<String>(name), |
+ optimized_code, |
+ Handle<Script>(info()->script()))); |
return SetLastStatus(SUCCEEDED); |
} |
@@ -497,6 +502,9 @@ |
script, |
info->code(), |
info)); |
+ VTUNEJIT(AddCode(Handle<String>(String::cast(script->name())), |
+ info->code(), |
+ script)); |
} else { |
PROFILE(isolate, CodeCreateEvent( |
info->is_eval() |
@@ -506,6 +514,9 @@ |
*result, |
isolate->heap()->empty_string())); |
GDBJIT(AddCode(Handle<String>(), script, info->code(), info)); |
+ VTUNEJIT(AddCode(Handle<String>(isolate->heap()->empty_string()), |
+ info->code(), |
+ script)); |
} |
// Hint to the runtime system used when allocating space for initial |
@@ -1031,6 +1042,10 @@ |
Handle<Script>(info->script()), |
Handle<Code>(info->code()), |
info)); |
+ if (tag == Logger::FUNCTION_TAG ) |
+ VTUNEJIT(AddCode(Handle<String>(shared->DebugName()), |
+ Handle<Code>(info->code()), |
+ Handle<Script>(info->script()))); |
} |
} } // namespace v8::internal |