Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj
authorNick Fitzgerald <fitzgen@gmail.com>
Mon, 14 Sep 2015 12:15:12 -0700
changeset 295025 7e587a5822420e7a018b96830eff1059720b0654
parent 295024 e4733b9eb53cdf487057b0905d6d6051bcd9e1ff
child 295026 e49720fee5a534ee671d9ea68773a2437b7f7ce1
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 c) volatile {
+        flags_ &= ~CATEGORY_MASK;
+        setFlag(static_cast<uint32_t>(c));
+    }
 
     void setOSR() volatile {
         MOZ_ASSERT(isJs());
         setFlag(OSR);
     }
     void unsetOSR() volatile {
         MOZ_ASSERT(isJs());
         unsetFlag(OSR);