5 #ifndef V8_ARM64_INSTRUMENT_ARM64_H_ 6 #define V8_ARM64_INSTRUMENT_ARM64_H_ 8 #include "src/globals.h" 11 #include "src/arm64/constants-arm64.h" 12 #include "src/arm64/decoder-arm64.h" 17 const int kCounterNameMaxLength = 256;
18 const uint64_t kDefaultInstrumentationSamplingPeriod = 1 << 22;
21 enum InstrumentState {
22 InstrumentStateDisable = 0,
23 InstrumentStateEnable = 1
35 explicit Counter(
const char* name, CounterType
type = Gauge);
46 char name_[kCounterNameMaxLength];
56 const char* datafile =
nullptr,
57 uint64_t sample_period = kDefaultInstrumentationSamplingPeriod);
61 #define DECLARE(A) void Visit##A(Instruction* instr); 70 void DumpCounterNames();
71 void DumpEventMarker(
unsigned marker);
72 void HandleInstrumentationEvent(
unsigned event);
73 Counter* GetCounter(
const char* name);
78 std::list<Counter*> counters_;
81 uint64_t sample_period_;
87 #endif // V8_ARM64_INSTRUMENT_ARM64_H_