Jakub Czapiga has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62020 )
Change subject: include/timestamp: Add timestamp_start/end() macro for timestamps ranges ......................................................................
include/timestamp: Add timestamp_start/end() macro for timestamps ranges
Timestamp IDs following pattern *_START/*_END can be used with macros introduces with this patch to make timestamping of execution stages easier and cleaner.
Signed-off-by: Jakub Czapiga jacz@semihalf.com Change-Id: I2a7d08b6b11e89d875a574468e11bc3e65a21b22 --- M src/include/timestamp.h 1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/62020/1
diff --git a/src/include/timestamp.h b/src/include/timestamp.h index cbe9934..2417315 100644 --- a/src/include/timestamp.h +++ b/src/include/timestamp.h @@ -42,6 +42,13 @@ #define get_us_since_boot() 0 #endif
+/* + * timestamp_start(id_prefix) and timestamp_end(id_prefix) should be called instead of + * timestamp_add_now(id) whenever possible to make it clear, when certain stage starts and ends.* + */ +#define timestamp_start(id_prefix) timestamp_add_now(id_prefix ## _START) +#define timestamp_end(id_prefix) timestamp_add_now(id_prefix ## _END) + /** * Workaround for guard combination above. */