Chromium Code Reviews| 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 7db23920f1e1f560bb16e0760d4cbfe96f385332..e07cddeee54fe1a96335b7be2588aa1fa804f2b0 100644 |
| --- a/components/tracing/common/process_metrics_memory_dump_provider.cc |
| +++ b/components/tracing/common/process_metrics_memory_dump_provider.cc |
| @@ -24,6 +24,10 @@ |
| #include "base/trace_event/process_memory_totals.h" |
| #include "build/build_config.h" |
| +#if defined(OS_WIN) |
| +#include "base/win/pe_image.h" |
|
Primiano Tucci (use gerrit)
2017/05/09 17:46:12
there is another OS_WIN section down on line 51, c
etienneb
2017/05/09 18:12:54
Done.
|
| +#endif // defined(OS_WIN) |
| + |
| #if defined(OS_MACOSX) |
| #include <libproc.h> |
| #include <mach/mach.h> |
| @@ -273,6 +277,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()) |