• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# hiappevent_event.h
2
3<!--Kit: Performance Analysis Kit-->
4<!--Subsystem: HiviewDFX-->
5<!--Owner: @liujiaxing2024-->
6<!--SE: @junjie_shi-->
7<!--TSE: @gcw_KuLfPSbe-->
8
9## Overview
10
11Defines the names of all predefined events. In addition to custom events associated with specific applications, you can use predefined events for logging.
12**File to include**: <hiappevent/hiappevent_event.h>
13
14**Library**: libhiappevent_ndk.z.so
15
16**System capability**: SystemCapability.HiviewDFX.HiAppEvent
17
18**Since**: 8
19
20**Related Module**: [HiAppEvent](capi-hiappevent.md)
21
22## Summary
23
24### Macros
25
26| Name                                                                                                        | Description                           |
27|------------------------------------------------------------------------------------------------------------|-------------------------------|
28| [EVENT_USER_LOGIN](#event_user_login) "hiappevent.user_login"                                              | User login event.<br>**Since**: 8       |
29| [EVENT_USER_LOGOUT](#event_user_logout) "hiappevent.user_logout"                                           | User logout event.<br>**Since**: 8       |
30| [EVENT_DISTRIBUTED_SERVICE_START](#event_distributed_service_start) "hiappevent.distributed_service_start" | Distributed service event.<br>**Since**: 8      |
31| [EVENT_APP_CRASH](#event_app_crash) "APP_CRASH"                                                            | Application crash event.<br>**Since**: 12      |
32| [EVENT_APP_FREEZE](#event_app_freeze) "APP_FREEZE"                                                         | Application freeze event.<br>**Since**: 12      |
33| [EVENT_APP_LAUNCH](#event_app_launch) "APP_LAUNCH"                                                         | Application loading event.<br>**Since**: 12      |
34| [EVENT_SCROLL_JANK](#event_scroll_jank) "SCROLL_JANK"                                                      | Application scrolling jank event.<br>**Since**: 12    |
35| [EVENT_CPU_USAGE_HIGH](#event_cpu_usage_high) "CPU_USAGE_HIGH"                                             | High application CPU usage event.<br>**Since**: 12|
36| [EVENT_BATTERY_USAGE](#event_battery_usage) "BATTERY_USAGE"                                                | Application power usage event.<br>**Since**: 12   |
37| [EVENT_RESOURCE_OVERLIMIT](#event_resource_overlimit) "RESOURCE_OVERLIMIT"                                 | Application resource threshold-crossing event.<br>**Since**: 12    |
38| [EVENT_ADDRESS_SANITIZER](#event_address_sanitizer) "ADDRESS_SANITIZER"                                    | Address sanitizer event.<br>**Since**: 12     |
39| [EVENT_MAIN_THREAD_JANK](#event_main_thread_jank) "MAIN_THREAD_JANK"                                       | Main thread jank event.<br>**Since**: 12   |
40| [EVENT_APP_HICOLLIE](#event_app_hicollie) "APP_HICOLLIE"                                                   | Task execution timeout event.<br>**Since**: 18  |
41| [DOMAIN_OS](#domain_os) "OS"                                                                               | OS scope.<br>**Since**: 12       |
42
43## Macro Description
44
45### EVENT_USER_LOGIN
46
47```
48#define EVENT_USER_LOGIN "hiappevent.user_login"
49```
50
51**Description**
52
53User login event.
54
55**Since**: 8
56
57### EVENT_USER_LOGOUT
58
59```
60#define EVENT_USER_LOGOUT "hiappevent.user_logout"
61```
62
63**Description**
64
65User logout event.
66
67**Since**: 8
68
69### EVENT_DISTRIBUTED_SERVICE_START
70
71```
72#define EVENT_DISTRIBUTED_SERVICE_START "hiappevent.distributed_service_start"
73```
74
75**Description**
76
77Distributed service event.
78
79**Since**: 8
80
81### EVENT_APP_CRASH
82
83```
84#define EVENT_APP_CRASH "APP_CRASH"
85```
86
87**Description**
88
89Application crash event.
90
91**Since**: 12
92
93### EVENT_APP_FREEZE
94
95```
96#define EVENT_APP_FREEZE "APP_FREEZE"
97```
98
99**Description**
100
101Application freeze event.
102
103**Since**: 12
104
105### EVENT_APP_LAUNCH
106
107```
108#define EVENT_APP_LAUNCH "APP_LAUNCH"
109```
110
111**Description**
112
113Application loading event.
114
115**Since**: 12
116
117### EVENT_SCROLL_JANK
118
119```
120#define EVENT_SCROLL_JANK "SCROLL_JANK"
121```
122
123**Description**
124
125Application scrolling jank event.
126
127**Since**: 12
128
129### EVENT_CPU_USAGE_HIGH
130
131```
132#define EVENT_CPU_USAGE_HIGH "CPU_USAGE_HIGH"
133```
134
135**Description**
136
137High application CPU usage event.
138
139**Since**: 12
140
141### EVENT_BATTERY_USAGE
142
143```
144#define EVENT_BATTERY_USAGE "BATTERY_USAGE"
145```
146
147**Description**
148
149Application power usage event.
150
151**Since**: 12
152
153### EVENT_RESOURCE_OVERLIMIT
154
155```
156#define EVENT_RESOURCE_OVERLIMIT "RESOURCE_OVERLIMIT"
157```
158
159**Description**
160
161Application resource threshold-crossing event.
162
163**Since**: 12
164
165### EVENT_ADDRESS_SANITIZER
166
167```
168#define EVENT_ADDRESS_SANITIZER "ADDRESS_SANITIZER"
169```
170
171**Description**
172
173Address sanitizer event.
174
175**Since**: 12
176
177### EVENT_MAIN_THREAD_JANK
178
179```
180#define EVENT_MAIN_THREAD_JANK "MAIN_THREAD_JANK"
181```
182
183**Description**
184
185Main thread jank event.
186
187**Since**: 12
188
189### EVENT_APP_HICOLLIE
190
191```
192#define EVENT_APP_HICOLLIE "APP_HICOLLIE"
193```
194
195**Description**
196
197Task execution timeout event.
198
199**Since**: 18
200
201### DOMAIN_OS
202
203```
204#define DOMAIN_OS "OS"
205```
206
207**Description**
208
209OS scope.
210
211**Since**: 12
212