HawkTracer
0.10.0
|
#include <hawktracer/ht_config.h>
#include <hawktracer/scoped_tracepoint.h>
#include <hawktracer/feature_cached_string.h>
Go to the source code of this file.
Macros | |
#define | HT_TP_STRACEPOINT(timeline, label) |
Creates a tracepoint that measures time spent in the scope. More... | |
#define | HT_TP_DYN_STRACEPOINT(timeline, label) HT_TP_SCOPED_INT(timeline, (uintptr_t)ht_feature_cached_string_add_mapping_dynamic(timeline, label)); |
Creates a tracepoint that measures time spent in the scope. More... | |
#define | HT_TP_FUNCTION(timeline) HT_TP_STRACEPOINT(timeline, __func__) |
Generates a tracepoint that measures time spent in the function. More... | |
#define HT_TP_DYN_STRACEPOINT | ( | timeline, | |
label | |||
) | HT_TP_SCOPED_INT(timeline, (uintptr_t)ht_feature_cached_string_add_mapping_dynamic(timeline, label)); |
Creates a tracepoint that measures time spent in the scope.
This method is slower than HT_TP_STRACEPOINT(), but allows user to use dynamic strings for label.
timeline | a timeline where the event will be posted to. |
label | a string label of the tracepoint. |
#define HT_TP_FUNCTION | ( | timeline | ) | HT_TP_STRACEPOINT(timeline, __func__) |
Generates a tracepoint that measures time spent in the function.
The macro shoudl be called as a first instruction of the traced function.
timeline | a timeline where the event will be posted to. |
#define HT_TP_STRACEPOINT | ( | timeline, | |
label | |||
) |
Creates a tracepoint that measures time spent in the scope.
The label must be a static string. If it's not, use HT_TP_DYN_STRACEPOINT() instead.
timeline | a timeline where the event will be posted to. |
label | a string label of the tracepoint. |