• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 PROCESS_INFO_H_
6 #define PROCESS_INFO_H_
7 
8 #include <map>
9 
10 #include "process_memory_stats.h"
11 
12 struct ThreadInfo {
13   int tid;
14   char name[16];
15 };
16 
17 struct ProcessInfo {
18   int pid;
19   bool in_kernel;
20   bool is_app;
21   char name[256];
22   char exe[256];
23   std::map<int, ThreadInfo> threads;
24 };
25 
26 struct ProcessSnapshot {
27   int pid;
28   ProcessMemoryStats memory;
29   // OOM badness and tolerance (oom_adj is deprecated).
30   int oom_score;
31   int oom_score_adj;
32   // Page faults.
33   unsigned long minor_faults;
34   unsigned long major_faults;
35   // Time spent in userspace and in the kernel.
36   unsigned long utime;
37   unsigned long stime;
38 };
39 
40 #endif  // PROCESS_INFO_H_
41