summaryrefslogtreecommitdiffstats
path: root/tools/profiler/tests/gtest/GeckoProfiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/profiler/tests/gtest/GeckoProfiler.cpp')
-rw-r--r--tools/profiler/tests/gtest/GeckoProfiler.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/profiler/tests/gtest/GeckoProfiler.cpp b/tools/profiler/tests/gtest/GeckoProfiler.cpp
index 79ed7cb52a..c9a26250db 100644
--- a/tools/profiler/tests/gtest/GeckoProfiler.cpp
+++ b/tools/profiler/tests/gtest/GeckoProfiler.cpp
@@ -140,8 +140,10 @@ TEST(GeckoProfiler, ThreadRegistrationInfo)
EXPECT_STREQ(trInfoHere.Name(), "Here");
EXPECT_NE(trInfoHere.Name(), "Here")
<< "ThreadRegistrationInfo should keep its own copy of the name";
- TimeStamp baseRegistrationTime =
- baseprofiler::detail::GetThreadRegistrationTime();
+ TimeStamp baseRegistrationTime;
+#ifdef MOZ_GECKO_PROFILER
+ baseRegistrationTime = baseprofiler::detail::GetThreadRegistrationTime();
+#endif
if (baseRegistrationTime) {
EXPECT_EQ(trInfoHere.RegisterTime(), baseRegistrationTime);
} else {
@@ -3228,12 +3230,14 @@ TEST(GeckoProfiler, Markers)
EXPECT_EQ(display[0u].asString(), "marker-chart");
EXPECT_EQ(display[1u].asString(), "marker-table");
- ASSERT_EQ(data.size(), 1u);
+ ASSERT_EQ(data.size(), 2u);
ASSERT_TRUE(data[0u].isObject());
EXPECT_EQ_JSON(data[0u]["key"], String, "name");
EXPECT_EQ_JSON(data[0u]["label"], String, "Details");
EXPECT_EQ_JSON(data[0u]["format"], String, "string");
+ EXPECT_EQ_JSON(data[1u]["label"], String, "Description");
+ EXPECT_EQ_JSON(data[1u]["value"], String, "Generic text marker");
} else if (nameString == "NoPayloadUserData") {
// TODO: Remove this when bug 1646714 lands.
@@ -3252,12 +3256,14 @@ TEST(GeckoProfiler, Markers)
EXPECT_EQ(display[1u].asString(), "marker-table");
EXPECT_EQ(display[2u].asString(), "timeline-overview");
- ASSERT_EQ(data.size(), 1u);
+ ASSERT_EQ(data.size(), 2u);
ASSERT_TRUE(data[0u].isObject());
EXPECT_EQ_JSON(data[0u]["key"], String, "category");
EXPECT_EQ_JSON(data[0u]["label"], String, "Type");
EXPECT_EQ_JSON(data[0u]["format"], String, "string");
+ EXPECT_EQ_JSON(data[1u]["label"], String, "Description");
+ EXPECT_EQ_JSON(data[1u]["value"], String, "Generic tracing marker");
} else if (nameString == "BHR-detected hang") {
EXPECT_EQ(display.size(), 2u);
@@ -3913,7 +3919,10 @@ class GTestStackCollector final : public ProfilerStackCollector {
virtual void CollectNativeLeafAddr(void* aAddr) { mFrames++; }
virtual void CollectJitReturnAddr(void* aAddr) { mFrames++; }
- virtual void CollectWasmFrame(const char* aLabel) { mFrames++; }
+ virtual void CollectWasmFrame(JS::ProfilingCategoryPair aCategory,
+ const char* aLabel) {
+ mFrames++;
+ }
virtual void CollectProfilingStackFrame(
const js::ProfilingStackFrame& aFrame) {
mFrames++;