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:
Jeff Muizelaar 2012-04-17 16:21:23 -04:00
parent 2b30980af0
commit 00409b37a6

View File

@ -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