Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: src/compiler.cc

Issue 10824032: Enables V8 integration with the Intel VTune performance analysis tool. This allows the VTune profi… (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698