• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright (C) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #ifndef MEMINFO_DATA_H
16 #define MEMINFO_DATA_H
17 #include <memory>
18 #include <sys/types.h>
19 #include <string>
20 namespace OHOS {
21 namespace HiviewDFX {
22 class MemInfoData {
23 public:
24     MemInfoData();
25     ~MemInfoData();
26 
27     struct MemInfo {
28         uint64_t rss;
29         uint64_t pss;
30         uint64_t sharedClean;
31         uint64_t sharedDirty;
32         uint64_t privateClean;
33         uint64_t privateDirty;
34         uint64_t swap;
35         uint64_t swapPss;
36         uint64_t heapSize;
37         uint64_t heapAlloc;
38         uint64_t heapFree;
39     };
40 
41     struct MemSmapsInfo {
42         uint64_t rss;
43         uint64_t pss;
44         uint64_t sharedClean;
45         uint64_t sharedDirty;
46         uint64_t privateClean;
47         uint64_t privateDirty;
48         uint64_t swap;
49         uint64_t swapPss;
50         std::string name;
51         std::string start;
52         std::string end;
53         std::string perm;
54         uint64_t size;
55         uint64_t counts;
56     };
57 
58     struct MemUsage {
59         uint64_t vss;
60         uint64_t rss;
61         uint64_t uss;
62         uint64_t pss;
63         uint64_t swapPss;
64         uint64_t gl;
65         uint64_t graph;
66         uint64_t dma;
67         uint64_t purgSum;
68         uint64_t purgPin;
69         int pid;
70         std::string name;
71         std::string adjLabel;
72     };
73 
74     struct DmaInfo {
75         uint64_t size;
76         uint64_t ino;
77         uint32_t pid;
78     };
79 
80     struct GraphicsMemory {
81         uint64_t gl;
82         uint64_t graph;
83     };
84 
85 private:
86 };
87 } // namespace HiviewDFX
88 } // namespace OHOS
89 
90 #endif