Merge V8 5.3.332.45. DO NOT MERGE
Test: Manual
FPIIM-449
Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/src/arm64/instrument-arm64.cc b/src/arm64/instrument-arm64.cc
index 7a8e2f4..dad89fe 100644
--- a/src/arm64/instrument-arm64.cc
+++ b/src/arm64/instrument-arm64.cc
@@ -429,6 +429,31 @@
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();