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

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

Issue 2869073002: Adding PE TimeStamp to chrome trace to ease retrieving debug information (Closed)
Patch Set: dcheng comments Created 3 years, 7 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/BUILD.gn ('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.cc
diff --git a/components/tracing/common/process_metrics_memory_dump_provider.cc b/components/tracing/common/process_metrics_memory_dump_provider.cc
index 696c58c8ae0d1c07bc3a7512eff69adcdaf9d65f..304b9e99239ea5ae0a5e6d740e5c7905685bb404 100644
--- a/components/tracing/common/process_metrics_memory_dump_provider.cc
+++ b/components/tracing/common/process_metrics_memory_dump_provider.cc
@@ -45,6 +45,7 @@
#include <windows.h>
#include <base/strings/sys_string_conversions.h>
+#include <base/win/pe_image.h>
#include <base/win/win_util.h>
#endif // defined(OS_WIN)
@@ -273,6 +274,12 @@ bool ProcessMetricsMemoryDumpProvider::DumpProcessMemoryMaps(
region.size_in_bytes = module_info.SizeOfImage;
region.mapped_file = base::SysWideToNativeMB(module_name);
region.start_address = reinterpret_cast<uint64_t>(module_info.lpBaseOfDll);
+
+ // The PE header field |TimeDateStamp| is required to build the PE code
+ // identifier which is used as a key to query symbols servers.
+ base::win::PEImage pe_image(module_info.lpBaseOfDll);
+ region.module_timestamp = pe_image.GetNTHeaders()->FileHeader.TimeDateStamp;
+
pmd->process_mmaps()->AddVMRegion(region);
}
if (!pmd->process_mmaps()->vm_regions().empty())
« no previous file with comments | « components/tracing/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698