mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 745864 - make SAMPLE_LABELS per line instead of per independent scope. r=bgirard a=blassey
--HG-- extra : rebase_source : 1d09f95da1677e9d13932017894f443d02aa40af
This commit is contained in:
parent
2b30980af0
commit
00409b37a6
@ -74,7 +74,12 @@ extern bool stack_key_initialized;
|
||||
#define SAMPLER_GET_FEATURES() mozilla_sampler_get_features()
|
||||
// we want the class and function name but can't easily get that using preprocessor macros
|
||||
// __func__ doesn't have the class name and __PRETTY_FUNCTION__ has the parameters
|
||||
#define SAMPLE_LABEL(name_space, info) mozilla::SamplerStackFrameRAII only_one_sampleraii_per_scope(name_space "::" info)
|
||||
|
||||
#define SAMPLER_APPEND_LINE_NUMBER_PASTE(id, line) id ## line
|
||||
#define SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, line) SAMPLER_APPEND_LINE_NUMBER_PASTE(id, line)
|
||||
#define SAMPLER_APPEND_LINE_NUMBER(id) SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, __LINE__)
|
||||
|
||||
#define SAMPLE_LABEL(name_space, info) mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info)
|
||||
#define SAMPLE_MARKER(info) mozilla_sampler_add_marker(info)
|
||||
|
||||
/* we duplicate this code here to avoid header dependencies
|
||||
|
Loading…
Reference in New Issue
Block a user