Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/tracing/common/process_metrics_memory_dump_provider.h" | 5 #include "components/tracing/common/process_metrics_memory_dump_provider.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 664 pmd->set_has_process_mmaps(); | 664 pmd->set_has_process_mmaps(); |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 | 667 |
| 668 #endif | 668 #endif |
| 669 #endif // !defined(OS_IOS) | 669 #endif // !defined(OS_IOS) |
| 670 | 670 |
| 671 pmd->process_totals()->set_resident_set_bytes(rss_bytes); | 671 pmd->process_totals()->set_resident_set_bytes(rss_bytes); |
| 672 pmd->set_has_process_totals(); | 672 pmd->set_has_process_totals(); |
| 673 pmd->process_totals()->set_peak_resident_set_bytes(peak_rss_bytes); | 673 pmd->process_totals()->set_peak_resident_set_bytes(peak_rss_bytes); |
| 674 LOG(ERROR) << "! setting rss " << rss_bytes; | |
|
Primiano Tucci (use gerrit)
2017/04/28 15:32:26
LOG(ERROR) << "! I don't think you mean to land th
| |
| 674 | 675 |
| 675 // Returns true even if other metrics failed, since rss is reported. | 676 // Returns true even if other metrics failed, since rss is reported. |
| 676 return true; | 677 return true; |
| 677 } | 678 } |
| 678 | 679 |
| 679 void ProcessMetricsMemoryDumpProvider::PollFastMemoryTotal( | 680 void ProcessMetricsMemoryDumpProvider::PollFastMemoryTotal( |
| 680 uint64_t* memory_total) { | 681 uint64_t* memory_total) { |
| 681 *memory_total = 0; | 682 *memory_total = 0; |
| 682 #if defined(OS_LINUX) || defined(OS_ANDROID) | 683 #if defined(OS_LINUX) || defined(OS_ANDROID) |
| 683 int statm_fd = fast_polling_statm_fd_for_testing; | 684 int statm_fd = fast_polling_statm_fd_for_testing; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 706 #endif | 707 #endif |
| 707 } | 708 } |
| 708 | 709 |
| 709 void ProcessMetricsMemoryDumpProvider::SuspendFastMemoryPolling() { | 710 void ProcessMetricsMemoryDumpProvider::SuspendFastMemoryPolling() { |
| 710 #if defined(OS_LINUX) || defined(OS_ANDROID) | 711 #if defined(OS_LINUX) || defined(OS_ANDROID) |
| 711 fast_polling_statm_fd_.reset(); | 712 fast_polling_statm_fd_.reset(); |
| 712 #endif | 713 #endif |
| 713 } | 714 } |
| 714 | 715 |
| 715 } // namespace tracing | 716 } // namespace tracing |
| OLD | NEW |