• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2024 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 
16 #ifndef HIVIEW_BASE_EVENT_REPORT_HIVIEW_EVENT_COMMON_H
17 #define HIVIEW_BASE_EVENT_REPORT_HIVIEW_EVENT_COMMON_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace HiviewDFX {
23 constexpr unsigned int LABEL_DOMAIN = 0xD002D10;
24 inline constexpr char EVENT_DOMAIN[] = "HIVIEWDFX";
25 
26 namespace BaseEventSpace {
27 inline constexpr char KEY_OF_DOMAIN[] = "domain_";
28 inline constexpr char KEY_OF_NAME[] = "name_";
29 inline constexpr char KEY_OF_TYPE[] = "type_";
30 }
31 
32 namespace PluginEventSpace {
33 inline constexpr char LOAD_EVENT_NAME[] = "PLUGIN_LOAD";
34 inline constexpr char UNLOAD_EVENT_NAME[] = "PLUGIN_UNLOAD";
35 inline constexpr char KEY_OF_PLUGIN_NAME[] = "NAME";
36 inline constexpr char KEY_OF_RESULT[] = "RESULT";
37 inline constexpr char KEY_OF_DURATION[] = "DURATION";
38 constexpr uint32_t LOAD_SUCCESS = 0;
39 constexpr uint32_t LOAD_DUPLICATE_NAME = 1;
40 constexpr uint32_t LOAD_UNREGISTERED = 2;
41 constexpr uint32_t UNLOAD_SUCCESS = 0;
42 constexpr uint32_t UNLOAD_INVALID = 1;
43 constexpr uint32_t UNLOAD_NOT_FOUND = 2;
44 constexpr uint32_t UNLOAD_IN_USE = 3;
45 }
46 
47 namespace PluginFaultEventSpace {
48 inline constexpr char EVENT_NAME[] = "PLUGIN_FAULT";
49 inline constexpr char KEY_OF_PLUGIN_NAME[] = "NAME";
50 inline constexpr char KEY_OF_REASON[] = "REASON";
51 }
52 
53 namespace PluginStatsEventSpace {
54 inline constexpr char EVENT_NAME[] = "PLUGIN_STATS";
55 inline constexpr char KEY_OF_PLUGIN_NAME[] = "NAME";
56 inline constexpr char KEY_OF_AVG_TIME[] = "AVG_TIME";
57 inline constexpr char KEY_OF_TOP_K_TIME[] = "TOP_K_TIME";
58 inline constexpr char KEY_OF_TOP_K_EVENT[] = "TOP_K_EVENT";
59 inline constexpr char KEY_OF_TOTAL[] = "TOTAL";
60 inline constexpr char KEY_OF_PROC_NAME[] = "PROC_NAME";
61 inline constexpr char KEY_OF_PROC_TIME[] = "PROC_TIME";
62 inline constexpr char KEY_OF_TOTAL_TIME[] = "TOTAL_TIME";
63 }
64 
65 namespace CpuSceneEvent {
66 inline constexpr char DOMAIN[] = "PERFORMANCE";
67 }
68 } // namespace HiviewDFX
69 } // namespace OHOS
70 #endif // HIVIEW_BASE_EVENT_REPORT_HIVIEW_EVENT_COMMON_H
71