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

Unified Diff: src/interpreter/interpreter.h

Issue 1899133004: [Interpreter] Add Ignition statistics JavaScript extension. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Change return type of bytecode_dispatch_counters_table() Created 4 years, 8 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/interpreter/interpreter.h
diff --git a/src/interpreter/interpreter.h b/src/interpreter/interpreter.h
index 155b2b5abee577c3517f97031259907aec21cd15..b2023d50ee3dfa14363af8a1b3c85bcc6e73acaf 100644
--- a/src/interpreter/interpreter.h
+++ b/src/interpreter/interpreter.h
@@ -49,14 +49,16 @@ class Interpreter {
void TraceCodegen(Handle<Code> code);
const char* LookupNameOfBytecodeHandler(Code* code);
- void WriteDispatchCounters();
+ uintptr_t GetDispatchCounter(Bytecode from, Bytecode to) const;
rmcilroy 2016/04/25 13:05:45 This can be private
Stefano Sanfilippo 2016/04/25 13:24:07 Done.
+
+ Local<v8::Object> GetDispatchCountersObject();
Address dispatch_table_address() {
return reinterpret_cast<Address>(&dispatch_table_[0]);
}
- uintptr_t* bytecode_dispatch_count_table() {
- return bytecode_dispatch_count_table_.get();
+ Address bytecode_dispatch_counters_table() {
+ return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get());
}
private:
@@ -144,10 +146,11 @@ class Interpreter {
static const int kNumberOfWideVariants = 3;
static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1);
+ static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1;
Isolate* isolate_;
Address dispatch_table_[kDispatchTableSize];
- v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_count_table_;
+ v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_;
DISALLOW_COPY_AND_ASSIGN(Interpreter);
};

Powered by Google App Engine
This is Rietveld 408576698