OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PROCFS_UTILS_H_ |
| 6 #define PROCFS_UTILS_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 |
| 11 #include "process_info.h" |
| 12 |
| 13 namespace procfs_utils { |
| 14 |
| 15 // ProcFS doesn't necessarly distinguish PID vs. TID, but all threads of a |
| 16 // process have the same Thread Group ID which is equal to Process ID. |
| 17 int ReadTgid(int pid); |
| 18 |
| 19 std::unique_ptr<ProcessInfo> ReadProcessInfo(int pid); |
| 20 void ReadProcessThreads(ProcessInfo* process); |
| 21 |
| 22 bool ReadOomStats(ProcessSnapshot* snapshot); |
| 23 bool ReadPageFaultsAndCpuTimeStats(ProcessSnapshot* snapshot); |
| 24 |
| 25 } // namespace procfs_utils |
| 26 |
| 27 #endif // PROCFS_UTILS_H_ |
OLD | NEW |