Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj
☠☠ backed out by 3e3f42614efb ☠ ☠
authorNick Fitzgerald <fitzgen@gmail.com>
Mon, 14 Sep 2015 09:19:59 -0700
changeset 294982 3fac2976a472427b5ebb037917419dbbc63c2505
parent 294981 a20b47a3d747faa9b89999f4d2acc6b75edb2ca5
child 294983 6abdb99b2b30dcd4fd5084b2b36771a6c8a9863b
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdjvj
bugs1204168
milestone43.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 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj
js/public/ProfilingStack.h
--- a/js/public/ProfilingStack.h
+++ b/js/public/ProfilingStack.h
@@ -121,19 +121,24 @@ class ProfileEntry
     }
     bool hasFlag(uint32_t flag) const volatile {
         return bool(flags_ & flag);
     }
 
     uint32_t flags() const volatile {
         return flags_;
     }
+
     uint32_t category() const volatile {
         return flags_ & CATEGORY_MASK;
     }
+    void setCategory(Category category) volatile {
+        flags_ &= ~CATEGORY_MASK;
+        setFlag(static_cast<uint32_t>(category));
+    }
 
     void setOSR() volatile {
         MOZ_ASSERT(isJs());
         setFlag(OSR);
     }
     void unsetOSR() volatile {
         MOZ_ASSERT(isJs());
         unsetFlag(OSR);