• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2/*
3 * Copyright (C) 2022 Huawei Device Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16export class Smaps {
17  startNs: number = -1;
18  startAddr: string = '';
19  endAddr: string = '';
20  address: string = '';
21  permission: string = '';
22  type: SmapsType = 0;
23  typeName: string = '';
24  path: string = '';
25  size: number = 0;
26  sizeStr: string = '';
27  count:number = 0;
28  rss: number = 0;
29  rssStr: string = '';
30  pss: number = 0;
31  pssStr: string = '';
32  sharedClean : number = 0;
33  sharedDirty:number = 0;
34  privateClean:number = 0;
35  privateDirty:number = 0;
36  swap:number = 0;
37  swapPss:number = 0;
38  resideStr: string = '';
39}
40export class SmapsTreeObj {
41  constructor(id: string, pid: string, type: string) {
42    this.id = id;
43    this.pid = pid;
44    this.typeName = type;
45  }
46  id: string = '';
47  pid: string = '';
48  typeName: string = '';
49  path: any = '';
50  size: number = 0;
51  sizeStr: string = '';
52  sizePro:number = 0;
53  sizeProStr :string = '';
54  count :number = 0 ;
55  rss: number = 0;
56  rssStr: string = '';
57  pss: number = 0;
58  pssStr: string = '';
59  sharedClean : number = 0;
60  sharedCleanStr:string = '';
61  sharedDirty:number = 0;
62  sharedDirtyStr:string = '';
63  privateClean:number = 0;
64  privateCleanStr:string = '';
65  privateDirty:number = 0;
66  privateDirtyStr:string = '';
67  swap:number = 0;
68  swapStr:string = '';
69  swapPss:number = 0;
70  swapPssStr:string = '';
71  children: Array<SmapsTreeObj> = [];
72}
73export enum SmapsType{
74  TYPE_CODE_SYS,
75  TYPE_CODE_APP,
76  TYPE_DATA_SYS,
77  TYPE_DATA_APP,
78  TYPE_UNKNOWN_ANON,
79  TYPE_STACK,
80  TYPE_JS_HEAP,
81  TYPE_JAVA_VM,
82  TYPE_NATIVE_HEAP,
83  TYPE_ASHMEM,
84  TYPE_OTHER_SYS,
85  TYPE_OTHER_APP
86}
87export const TYPE_STRING = ['CODE_SYS','CODE_APP','DATA_SYS','DATA_APP','UNKNOWN_ANON','STACK','JS_HEAP','JAVA_VM','NATIVE_HEAP','ASHMEM','OTHER_SYS','OTHER_APP']