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

Unified Diff: src/full-codegen.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/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();
}

Powered by Google App Engine
This is Rietveld 408576698