| Index: src/arm64/instrument-arm64.cc
|
| diff --git a/src/arm64/instrument-arm64.cc b/src/arm64/instrument-arm64.cc
|
| index dad89fe6bffff03ffb695a53e0617c5cd4779e14..bf878c526c221e54ad7afef32eaa9d6e1a36e954 100644
|
| --- a/src/arm64/instrument-arm64.cc
|
| +++ b/src/arm64/instrument-arm64.cc
|
| @@ -61,39 +61,41 @@ typedef struct {
|
| CounterType type;
|
| } CounterDescriptor;
|
|
|
| -
|
| static const CounterDescriptor kCounterList[] = {
|
| - {"Instruction", Cumulative},
|
| -
|
| - {"Move Immediate", Gauge},
|
| - {"Add/Sub DP", Gauge},
|
| - {"Logical DP", Gauge},
|
| - {"Other Int DP", Gauge},
|
| - {"FP DP", Gauge},
|
| -
|
| - {"Conditional Select", Gauge},
|
| - {"Conditional Compare", Gauge},
|
| -
|
| - {"Unconditional Branch", Gauge},
|
| - {"Compare and Branch", Gauge},
|
| - {"Test and Branch", Gauge},
|
| - {"Conditional Branch", Gauge},
|
| -
|
| - {"Load Integer", Gauge},
|
| - {"Load FP", Gauge},
|
| - {"Load Pair", Gauge},
|
| - {"Load Literal", Gauge},
|
| -
|
| - {"Store Integer", Gauge},
|
| - {"Store FP", Gauge},
|
| - {"Store Pair", Gauge},
|
| -
|
| - {"PC Addressing", Gauge},
|
| - {"Other", Gauge},
|
| - {"SP Adjust", Gauge},
|
| + {"Instruction", Cumulative},
|
| +
|
| + {"Move Immediate", Gauge},
|
| + {"Add/Sub DP", Gauge},
|
| + {"Logical DP", Gauge},
|
| + {"Other Int DP", Gauge},
|
| + {"FP DP", Gauge},
|
| +
|
| + {"Conditional Select", Gauge},
|
| + {"Conditional Compare", Gauge},
|
| +
|
| + {"Unconditional Branch", Gauge},
|
| + {"Compare and Branch", Gauge},
|
| + {"Test and Branch", Gauge},
|
| + {"Conditional Branch", Gauge},
|
| +
|
| + {"Load Integer", Gauge},
|
| + {"Load FP", Gauge},
|
| + {"Load Pair", Gauge},
|
| + {"Load Literal", Gauge},
|
| + {"Load Exclusive", Gauge},
|
| + {"Load Acquire", Gauge},
|
| +
|
| + {"Store Integer", Gauge},
|
| + {"Store FP", Gauge},
|
| + {"Store Pair", Gauge},
|
| + {"Store Exclusive", Gauge},
|
| + {"Store Release", Gauge},
|
| +
|
| + {"PC Addressing", Gauge},
|
| + {"Other", Gauge},
|
| + {"SP Adjust", Gauge},
|
| };
|
|
|
| -
|
| Instrument::Instrument(const char* datafile, uint64_t sample_period)
|
| : output_stream_(stderr), sample_period_(sample_period) {
|
|
|
| @@ -429,6 +431,29 @@ void Instrument::VisitLoadStoreUnsignedOffset(Instruction* instr) {
|
| InstrumentLoadStore(instr);
|
| }
|
|
|
| +void Instrument::VisitLoadStoreExclusive(Instruction* instr) {
|
| + Update();
|
| + static Counter* load_counter = GetCounter("Load Exclusive");
|
| + static Counter* store_counter = GetCounter("Store Exclusive");
|
| +
|
| + switch (instr->Mask(LoadStoreAcquireReleaseMask)) {
|
| + case LDXRB: // Fall-through.
|
| + case LDXRH: // Fall-through.
|
| + case LDXR_w: // Fall-through.
|
| + case LDXR_x:
|
| + load_counter->Increment();
|
| + break;
|
| + case STXRB: // Fall-through.
|
| + case STXRH: // Fall-through.
|
| + case STXR_w: // Fall-through.
|
| + case STXR_x:
|
| + store_counter->Increment();
|
| + break;
|
| + default:
|
| + UNREACHABLE();
|
| + }
|
| +}
|
| +
|
| void Instrument::VisitLoadStoreAcquireRelease(Instruction* instr) {
|
| Update();
|
| static Counter* load_counter = GetCounter("Load Acquire");
|
|
|