• 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         uint64_t size;
54         uint64_t counts;
55     };
56 
57     struct MemUsage {
58         uint64_t vss;
59         uint64_t rss;
60         uint64_t uss;
61         uint64_t pss;
62         uint64_t swapPss;
63         uint64_t gl;
64         uint64_t graph;
65         int pid;
66         std::string name;
67         std::string adjLabel;
68     };
69 
70     struct GraphicsMemory {
71         uint64_t gl;
72         uint64_t graph;
73     };
74 
75 private:
76 };
77 } // namespace HiviewDFX
78 } // namespace OHOS
79 
80 #endif