Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 8e1ad649c9101ed396520087d9e4d5edd0e3d118..7290dd2538e8b5f7ec5ab7a8c314a4ba6fc14072 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -32,6 +32,7 @@ |
#include "vm/symbols.h" |
#include "vm/timer.h" |
#include "vm/unicode.h" |
+#include "vm/vtune.h" |
namespace dart { |
@@ -7047,6 +7048,8 @@ RawCode* Code::FinalizeCode(const char* name, |
} |
} |
+ VTune::Register(name, instrs.EntryPoint(), instrs.size()); |
Ivan Posva
2012/11/26 04:36:38
We should really clean this up. The different tool
Vyacheslav Egorov (Google)
2012/11/26 15:11:10
Refactored.
|
+ |
const ZoneGrowableArray<int>& pointer_offsets = |
assembler->GetPointerOffsets(); |
@@ -7079,7 +7082,8 @@ RawCode* Code::FinalizeCode(const Function& function, |
// Calling ToFullyQualifiedCString is very expensive, try to avoid it. |
if (FLAG_generate_gdb_symbols || |
Dart::perf_events_writer() != NULL || |
- Dart::pprof_symbol_generator() != NULL) { |
+ Dart::pprof_symbol_generator() != NULL || |
+ VTune::IsActive()) { |
Ivan Posva
2012/11/26 04:36:38
This seems rather error prone, as the checking is
Vyacheslav Egorov (Google)
2012/11/26 15:11:10
Refactored.
|
return FinalizeCode(function.ToFullyQualifiedCString(), |
assembler, |
optimized); |