Merge pull request #3 from ARM-software/stalls

Added L2 stalls interface
diff --git a/README.md b/README.md
index 87fbdb3..4a7973a 100644
--- a/README.md
+++ b/README.md
@@ -67,7 +67,9 @@
  - Vertex/compute jobs
  - L2 cache read lookups
  - L2 cache external reads
+ - L2 cache external read stalls
  - L2 cache write lookups
  - L2 cache external writes
+ - L2 cache external write stalls
 
 For more information regarding these counters, see [Mali Performance Counters](https://community.arm.com/graphics/b/blog/posts/mali-bifrost-family-performance-counters).
diff --git a/mali_counter.cpp b/mali_counter.cpp
index 7f40ff2..1622cc8 100644
--- a/mali_counter.cpp
+++ b/mali_counter.cpp
@@ -205,8 +205,10 @@
 	        {"JS1_JOBS", Measurement(0, "jobs")},
 	        {"L2_READ_LOOKUP", Measurement(0, "cache lookups")},
 	        {"L2_EXT_READ", Measurement(0, "transactions")},
+	        {"L2_EXT_AR_STALL", Measurement(0, "stall cycles")},
 	        {"L2_WRITE_LOOKUP", Measurement(0, "cache lookups")},
 	        {"L2_EXT_WRITE", Measurement(0, "transactions")},
+	        {"L2_EXT_W_STALL", Measurement(0, "stall cycles")},
 	    };
 
 	init();
@@ -466,8 +468,10 @@
 	const uint32_t *mmu_counter     = get_counters(mali_userspace::MALI_NAME_BLOCK_MMU);
 	_counters.at("L2_READ_LOOKUP")  = Measurement(mmu_counter[find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_MMU, "L2_READ_LOOKUP")], _counters.at("L2_READ_LOOKUP").unit());
 	_counters.at("L2_EXT_READ")     = Measurement(mmu_counter[find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_MMU, "L2_EXT_READ")], _counters.at("L2_EXT_READ").unit());
+	_counters.at("L2_EXT_AR_STALL") = Measurement(mmu_counter[find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_MMU, "L2_EXT_AR_STALL")], _counters.at("L2_EXT_AR_STALL").unit());
 	_counters.at("L2_WRITE_LOOKUP") = Measurement(mmu_counter[find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_MMU, "L2_WRITE_LOOKUP")], _counters.at("L2_WRITE_LOOKUP").unit());
 	_counters.at("L2_EXT_WRITE")    = Measurement(mmu_counter[find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_MMU, "L2_EXT_WRITE")], _counters.at("L2_EXT_WRITE").unit());
+	_counters.at("L2_EXT_W_STALL")  = Measurement(mmu_counter[find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_MMU, "L2_EXT_W_STALL")], _counters.at("L2_EXT_W_STALL").unit());
 
 	_stop_time = _timestamp;
 }
@@ -486,8 +490,10 @@
 	    {"Vertex/compute jobs", _counters.at("JS1_JOBS")},
 	    {"L2 cache read lookups", _counters.at("L2_READ_LOOKUP")},
 	    {"L2 cache external reads", _counters.at("L2_EXT_READ")},
+	    {"L2 cache external read stalls", _counters.at("L2_EXT_AR_STALL")},
 	    {"L2 cache write lookups", _counters.at("L2_WRITE_LOOKUP")},
 	    {"L2 cache external writes", _counters.at("L2_EXT_WRITE")},
+	    {"L2 cache external write stalls", _counters.at("L2_EXT_W_STALL")},
 	};
 
 	return measurements;