Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Unified Diff: components/metrics/call_stack_profile_metrics_provider_unittest.cc

Issue 1030923002: StackSamplingProfiler clean up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: add comment on priority boost Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/call_stack_profile_metrics_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/call_stack_profile_metrics_provider_unittest.cc
diff --git a/components/metrics/call_stack_profile_metrics_provider_unittest.cc b/components/metrics/call_stack_profile_metrics_provider_unittest.cc
index 20e53d60775903c6624d995af32634b3e6bf9274..a4e3efb9cc9935311307079f48aa345fb83d8628 100644
--- a/components/metrics/call_stack_profile_metrics_provider_unittest.cc
+++ b/components/metrics/call_stack_profile_metrics_provider_unittest.cc
@@ -12,7 +12,7 @@
using base::StackSamplingProfiler;
using Frame = StackSamplingProfiler::Frame;
using Module = StackSamplingProfiler::Module;
-using Profile = StackSamplingProfiler::Profile;
+using Profile = StackSamplingProfiler::CallStackProfile;
using Sample = StackSamplingProfiler::Sample;
namespace metrics {
@@ -201,7 +201,7 @@ TEST(CallStackProfileMetricsProviderTest, MultipleProfiles) {
module_base_address), entry.address());
ASSERT_TRUE(entry.has_module_id_index());
EXPECT_EQ(profile_sample_frames[i][j][k].module_index,
- entry.module_id_index());
+ static_cast<size_t>(entry.module_id_index()));
}
}
@@ -298,7 +298,8 @@ TEST(CallStackProfileMetricsProviderTest, RepeatedStacksUnordered) {
EXPECT_EQ(static_cast<uint64>(instruction_pointer - module_base_address),
entry.address());
ASSERT_TRUE(entry.has_module_id_index());
- EXPECT_EQ(sample_frames[i][j].module_index, entry.module_id_index());
+ EXPECT_EQ(sample_frames[i][j].module_index,
+ static_cast<size_t>(entry.module_id_index()));
}
}
}
@@ -374,7 +375,8 @@ TEST(CallStackProfileMetricsProviderTest, RepeatedStacksOrdered) {
EXPECT_EQ(static_cast<uint64>(instruction_pointer - module_base_address),
entry.address());
ASSERT_TRUE(entry.has_module_id_index());
- EXPECT_EQ(sample_frames[i][j].module_index, entry.module_id_index());
+ EXPECT_EQ(sample_frames[i][j].module_index,
+ static_cast<size_t>(entry.module_id_index()));
}
}
}
@@ -382,8 +384,8 @@ TEST(CallStackProfileMetricsProviderTest, RepeatedStacksOrdered) {
// Checks that unknown modules produce an empty Entry.
TEST(CallStackProfileMetricsProviderTest, UnknownModule) {
- // -1 indicates an unknown module.
- const Frame frame(reinterpret_cast<const void*>(0x1000), -1);
+ const Frame frame(reinterpret_cast<const void*>(0x1000),
+ Frame::kUnknownModuleIndex);
Profile profile;
« no previous file with comments | « components/metrics/call_stack_profile_metrics_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698