Bug 1332577 (part 8) - Rename moz_profiler_*() as profiler_*(). r=mstange.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sat, 21 Jan 2017 08:45:49 +1100
changeset 375517 6c6ecff45a92f07925d9fae12681f2a143efd392
parent 375516 1e467949bdad0839aca0ec6b51a6d1b8f8e25226
child 375518 4ab72b5b2cbddb06685410b23e4397bd407d3669
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1332577
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1332577 (part 8) - Rename moz_profiler_*() as profiler_*(). r=mstange. This makes them consistent with other profiler functions.
tools/profiler/core/platform.cpp
tools/profiler/core/platform.h
--- a/tools/profiler/core/platform.cpp
+++ b/tools/profiler/core/platform.cpp
@@ -284,36 +284,36 @@ void ProfilerMarker::StreamJSON(Spliceab
   aWriter.EndArray();
 }
 
 /* Has MOZ_PROFILER_VERBOSE been set? */
 
 // Verbosity control for the profiler.  The aim is to check env var
 // MOZ_PROFILER_VERBOSE only once.  However, we may need to temporarily
 // override that so as to print the profiler's help message.  That's
-// what moz_profiler_set_verbosity is for.
+// what profiler_set_verbosity is for.
 
 enum class ProfilerVerbosity : int8_t { UNCHECKED, NOTVERBOSE, VERBOSE };
 
 // Raced on, potentially
 static ProfilerVerbosity profiler_verbosity = ProfilerVerbosity::UNCHECKED;
 
-bool moz_profiler_verbose()
+bool profiler_verbose()
 {
   if (profiler_verbosity == ProfilerVerbosity::UNCHECKED) {
     if (getenv("MOZ_PROFILER_VERBOSE") != nullptr)
       profiler_verbosity = ProfilerVerbosity::VERBOSE;
     else
       profiler_verbosity = ProfilerVerbosity::NOTVERBOSE;
   }
 
   return profiler_verbosity == ProfilerVerbosity::VERBOSE;
 }
 
-void moz_profiler_set_verbosity(ProfilerVerbosity pv)
+void profiler_set_verbosity(ProfilerVerbosity pv)
 {
    MOZ_ASSERT(pv == ProfilerVerbosity::UNCHECKED ||
               pv == ProfilerVerbosity::VERBOSE);
    profiler_verbosity = pv;
 }
 
 
 bool set_profiler_interval(const char* interval) {
@@ -375,21 +375,21 @@ void read_profiler_env_vars()
   sProfileEntries = 0;
 
   const char* interval = getenv(PROFILER_INTERVAL);
   const char* entries = getenv(PROFILER_ENTRIES);
   const char* scanCount = getenv(PROFILER_STACK);
 
   if (getenv(PROFILER_HELP)) {
      // Enable verbose output
-     moz_profiler_set_verbosity(ProfilerVerbosity::VERBOSE);
+     profiler_set_verbosity(ProfilerVerbosity::VERBOSE);
      profiler_usage();
-     // Now force the next enquiry of moz_profiler_verbose to re-query
+     // Now force the next enquiry of profiler_verbose to re-query
      // env var MOZ_PROFILER_VERBOSE.
-     moz_profiler_set_verbosity(ProfilerVerbosity::UNCHECKED);
+     profiler_set_verbosity(ProfilerVerbosity::UNCHECKED);
   }
 
   if (!set_profiler_interval(interval) ||
       !set_profiler_entries(entries) ||
       !set_profiler_scan(scanCount)) {
       profiler_usage();
   } else {
     LOG( "SPS:");
--- a/tools/profiler/core/platform.h
+++ b/tools/profiler/core/platform.h
@@ -71,40 +71,40 @@ static inline pid_t gettid()
 #endif
 
 #ifdef XP_WIN
 #include <windows.h>
 #endif
 
 #define ASSERT(a) MOZ_ASSERT(a)
 
-bool moz_profiler_verbose();
+bool profiler_verbose();
 
 #ifdef ANDROID
 # if defined(__arm__) || defined(__thumb__)
 #  define ENABLE_SPS_LEAF_DATA
 #  define ENABLE_ARM_LR_SAVING
 # endif
 # define LOG(text) \
-    do { if (moz_profiler_verbose()) \
+    do { if (profiler_verbose()) \
            __android_log_write(ANDROID_LOG_ERROR, "Profiler", text); \
     } while (0)
 # define LOGF(format, ...) \
-    do { if (moz_profiler_verbose()) \
+    do { if (profiler_verbose()) \
            __android_log_print(ANDROID_LOG_ERROR, "Profiler", format, \
                                __VA_ARGS__); \
     } while (0)
 
 #else
 # define LOG(text) \
-    do { if (moz_profiler_verbose()) fprintf(stderr, "Profiler: %s\n", text); \
+    do { if (profiler_verbose()) fprintf(stderr, "Profiler: %s\n", text); \
     } while (0)
 # define LOGF(format, ...) \
-    do { if (moz_profiler_verbose()) fprintf(stderr, "Profiler: " format \
-                                             "\n", __VA_ARGS__);        \
+    do { if (profiler_verbose()) fprintf(stderr, "Profiler: " format "\n", \
+                                         __VA_ARGS__); \
     } while (0)
 
 #endif
 
 #if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_LINUX)
 #define ENABLE_SPS_LEAF_DATA
 #endif