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

Unified Diff: components/tracing/common/process_metrics_memory_dump_provider_unittest.cc

Issue 2674973004: mac: Emit dyld info from the memory dump provider. (Closed)
Patch Set: Use initprot instead of maxprot. Created 3 years, 10 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/tracing/common/process_metrics_memory_dump_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/common/process_metrics_memory_dump_provider_unittest.cc
diff --git a/components/tracing/common/process_metrics_memory_dump_provider_unittest.cc b/components/tracing/common/process_metrics_memory_dump_provider_unittest.cc
index fc53f77a7811e6db365800e9afc9bb3274092b1d..4c9ba7c9ac0fa86c5d2fb6d206d5f03f8f736530 100644
--- a/components/tracing/common/process_metrics_memory_dump_provider_unittest.cc
+++ b/components/tracing/common/process_metrics_memory_dump_provider_unittest.cc
@@ -288,7 +288,8 @@ TEST(ProcessMetricsMemoryDumpProviderTest, TestMachOReading) {
ASSERT_EQ(0, result);
std::string name = basename(full_path);
- bool found_components_unittests = false;
+ uint64_t components_unittests_resident_pages = 0;
+ bool found_appkit = false;
for (const VMRegion& region : dump.process_mmaps()->vm_regions()) {
EXPECT_NE(0u, region.start_address);
EXPECT_NE(0u, region.size_in_bytes);
@@ -298,10 +299,19 @@ TEST(ProcessMetricsMemoryDumpProviderTest, TestMachOReading) {
VMRegion::kProtectionFlagsRead | VMRegion::kProtectionFlagsExec;
if (region.mapped_file.find(name) != std::string::npos &&
region.protection_flags == required_protection_flags) {
- found_components_unittests = true;
+ components_unittests_resident_pages +=
+ region.byte_stats_private_dirty_resident +
+ region.byte_stats_shared_dirty_resident +
+ region.byte_stats_private_clean_resident +
+ region.byte_stats_shared_clean_resident;
+ }
+
+ if (region.mapped_file.find("AppKit") != std::string::npos) {
+ found_appkit = true;
}
}
- EXPECT_TRUE(found_components_unittests);
+ EXPECT_GT(components_unittests_resident_pages, 0u);
+ EXPECT_TRUE(found_appkit);
}
#endif // defined(OS_MACOSX)
« no previous file with comments | « components/tracing/common/process_metrics_memory_dump_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698