Index: src/arm64/instrument-arm64.cc |
diff --git a/src/arm64/instrument-arm64.cc b/src/arm64/instrument-arm64.cc |
index 7a8e2f4ee1dd4a02d66fe2b2fc48fbdfe274d79a..dad89fe6bffff03ffb695a53e0617c5cd4779e14 100644 |
--- a/src/arm64/instrument-arm64.cc |
+++ b/src/arm64/instrument-arm64.cc |
@@ -429,6 +429,31 @@ void Instrument::VisitLoadStoreUnsignedOffset(Instruction* instr) { |
InstrumentLoadStore(instr); |
} |
+void Instrument::VisitLoadStoreAcquireRelease(Instruction* instr) { |
+ Update(); |
+ static Counter* load_counter = GetCounter("Load Acquire"); |
+ static Counter* store_counter = GetCounter("Store Release"); |
+ |
+ switch (instr->Mask(LoadStoreAcquireReleaseMask)) { |
+ case LDAR_b: // Fall-through. |
+ case LDAR_h: // Fall-through. |
+ case LDAR_w: // Fall-through. |
+ case LDAR_x: // Fall-through. |
+ case LDAXR_b: // Fall-through. |
+ case LDAXR_h: // Fall-through. |
+ case LDAXR_w: // Fall-through. |
+ case LDAXR_x: load_counter->Increment(); break; |
+ case STLR_b: // Fall-through. |
+ case STLR_h: // Fall-through. |
+ case STLR_w: // Fall-through. |
+ case STLR_x: // Fall-through. |
+ case STLXR_b: // Fall-through. |
+ case STLXR_h: // Fall-through. |
+ case STLXR_w: // Fall-through. |
+ case STLXR_x: store_counter->Increment(); break; |
+ default: UNREACHABLE(); |
+ } |
+} |
void Instrument::VisitLogicalShifted(Instruction* instr) { |
Update(); |