зеркало из https://github.com/mozilla/gecko-dev.git
82d4c11201
There are lots of profiler_*() functions that simply call onto equivalent or nearly-equivalent mozilla_sampler_*() functions. This patch removes the unnecessary indirection by removing the mozilla_sampler_*() functions. The most important changes: - In platform.cpp, all the mozilla_sampler_*() definitions are renamed as profiler_*(). - In GeckoProfiler.h, the new PROFILER_FUNC{,_VOID} macros provide a neat way to declare the functions that must be present whether the profiler is enabled or not. - In GeckoProfiler.h, all the mozilla_sampler_*() declarations are removed, as are all the profiler_*() definitions that corresponded to a mozilla_sampler_*() function. Other things of note: - profiler_log(const char* str) is now defined in platform.cpp, instead of in GeckoProfiler.h, for consistency with all the other profiler_*() functions. Likewise with profiler_js_operation_callback() and profiler_in_privacy_mode(). - ProfilerBacktraceDestructor::operator() is treated slightly different to all the profiler_*() functions. - Both variants of profiler_tracing() got some early-return conditions moved into them from GeckoProfiler.h. - There were some cases where the profiler_*() and mozilla_sampler_*() name didn't quite match. Specifically: * mozilla_sampler_get_profile_data() and profiler_get_profiler_jsobject(): name mismatch. Kept the latter. * mozilla_sampler_get_profile_data_async() and profiler_get_profile_jsobject_async(): name mismatch. Kept the latter. * mozilla_sampler_register_thread() and profiler_register_thread(): return type mismatch. Changed to void. * mozilla_sampler_frame_number() and profiler_set_frame_number(): name mismatch. Kept the latter. * mozilla_sampler_save_profile_to_file() and profile_sampler_save_profile_to_file(): the former was 'extern "C"' so it could be called from a debugger easily. The latter now is 'extern "C"'. - profiler_get_buffer_info() didn't fit the patterns handled by PROFILER_FUNC{,VOID}, so the patch makes it call onto the new function profiler_get_buffer_info_helper(), which does fit the pattern. --HG-- extra : rebase_source : fa1817854ade81e8a3027907d1476ff2563f1cc2 |
||
---|---|---|
.. | ||
bloatview | ||
coverity | ||
docs | ||
fuzzing | ||
jprof | ||
leak-gauge | ||
lint | ||
memory | ||
memory-profiler | ||
mercurial | ||
power | ||
profiler | ||
quitter | ||
rb | ||
rewriting | ||
update-packaging | ||
mach_commands.py | ||
moz.build |