Profiler: Improvements on data fetching
Replace the PROF_FETCH_DATA_x by PROF_FETCH_DATA_BY_CP_x
The original PROF_FETCH_DATA_x takes tag_pattern, tag_mask
as input parameters. However the users only know the cp/topic
pair when do PROF_TIMING_LOG. Tag marks are supposed to be
internal only.
Change-Id: I58085b626232cb0ca48342b8f582322644609ba3
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/profiler/export/prof_if_s.h b/profiler/export/prof_if_s.h
index e24b859..041e6fb 100644
--- a/profiler/export/prof_if_s.h
+++ b/profiler/export/prof_if_s.h
@@ -50,21 +50,26 @@
#define PROF_DO_CALIBRATE(rounds) prof_calibrate( \
PROF_CALI_IDX_S, rounds, 0)
-/*
- * Get the calibration value from the tag.
- * The calibrated counter is
- * "current_counter" - "previous_counter" - "current_cali_value"
- * "current_cali_value" = PROF_GET_CALI_VALUE_FROM_TAG(current_tag)
- */
+/* Get the calibration value from the tag. */
#define PROF_GET_CALI_VALUE_FROM_TAG(tag) prof_get_cali_value( \
PROF_GET_CALI_IDX_FROM_TAG(tag))
-/* Get data */
-#define PROF_FETCH_DATA_START(tag, data, tag_pattern, tag_mask) \
- prof_get_data_start(tag, data, tag_pattern, tag_mask)
+/*
+ * Get data, not calibrated.
+ * The calibrated counter (diff) is
+ * "current_counter" - "previous_counter" - "current_cali_value"
+ * "current_cali_value" = PROF_GET_CALI_VALUE_FROM_TAG(current_tag)
+ *
+ * "tag" and "data" are outputs which should be pointers.
+ * "tag" is used to get calibration data.
+ */
+#define PROF_FETCH_DATA_START(tag, data, cp, topic) \
+ prof_get_data_start(tag, data, \
+ PROF_MAKE_TIMING_TAG(cp, topic, 0, 0), PROF_MASK_TOPIC_CP)
-#define PROF_FETCH_DATA_CONTINUE(tag, data, tag_pattern, tag_mask) \
- prof_get_data_continue(tag, data, tag_pattern, tag_mask)
+#define PROF_FETCH_DATA_CONTINUE(tag, data, cp, topic) \
+ prof_get_data_continue(tag, data, \
+ PROF_MAKE_TIMING_TAG(cp, topic, 0, 0), PROF_MASK_TOPIC_CP)
#define PROF_FETCH_DATA_BY_TOPIC_START(tag, data, topic) \
prof_get_data_start(tag, data, \
@@ -74,14 +79,6 @@
prof_get_data_continue(tag, data, \
PROF_MAKE_TIMING_TAG(0, topic, 0, 0), PROF_MASK_TOPIC)
-#define PROF_FETCH_DATA_BY_CP_START(tag, data, cp, topic) \
- prof_get_data_start(tag, data, \
- PROF_MAKE_TIMING_TAG(cp, topic, 0, 0), PROF_MASK_TOPIC_CP)
-
-#define PROF_FETCH_DATA_BY_CP_CONTINUE(tag, data, cp, topic) \
- prof_get_data_continue(tag, data, \
- PROF_MAKE_TIMING_TAG(cp, topic, 0, 0), PROF_MASK_TOPIC_CP)
-
/* Data analysis with calibration */
#define PROF_DATA_DIFF(cp_a, topic_a, cp_b, topic_b) \
prof_data_diff(PROF_MAKE_TIMING_TAG((cp_a), (topic_a), \