• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13#
14# To add new event, create new record in the 'events' section with following fields:
15# - name - name of the event
16# - fields - data fields that will be stored within event. The type of each field should be a real C++ type, except enum.
17# Then you can dump your event by writing EVENT_<name.upcase()>(values). For example, for 'osr_entry' event it will be:
18# EVENT_OSR_ENTRY(method->GetFullName(), bc, events::OsrEntryKind::TOP_FRAME, events::OsrEntryResult::SUCCESS)
19#
20# There are may be several backends(streams) for events, such as csv file, memory, etc.
21# Backend can be chosen in runtime by invoking Events::Create(<Events::StreamKind>).
22# The following streams are currently available:
23# - EventsMemory: store events in the heap memory, useful for tests.
24# - EventsCsv: dump events to the csv file, useful for statistics gathering.
25#
26events:
27- name: osr_entry
28  fields:
29  - name: method_name
30    type: std::string
31  - name: bc_offset
32    type: size_t
33  - name: kind
34    type: enum
35    enum: [after_cframe, after_iframe, top_frame]
36  - name: result
37    type: enum
38    enum: [success, error]
39
40- name: inline
41  fields:
42  - name: caller
43    type: std::string
44  - name: callee
45    type: std::string
46  - name: call_inst_id
47    type: int
48  - name: kind
49    type: enum
50    enum: [static, virtual, virtual_cha, virtual_monomorphic, virtual_polymorphic, dynamic_monomorphic, dynamic_polymorphic]
51  - name: result
52    type: enum
53    enum: [success, fail, fail_resolve, fail_megamorphic, unsuitable, noinline, lost_single_impl, limit, ignore_limit, devirtualized, inf_loop, skip_external]
54
55- name: deoptimization
56  fields:
57  - name: method_name
58    type: std::string
59  - name: pc
60    type: uintptr_t
61  - name: after
62    type: enum
63    enum: [cframe, iframe, top]
64
65- name: deoptimization_reason
66  fields:
67  - name: method_name
68    type: std::string
69  - name: reason
70    type: std::string
71
72- name: exception
73  fields:
74  - name: method_name
75    type: std::string
76  - name: pc
77    type: size_t
78  - name: npc
79    type: size_t
80  - name: type
81    type: enum
82    enum: [null_check, bound_check, negative_size, native, throw, abstract_method, arithmetic, instantiation_error,
83           cast_check, stack_overflow, icce_method_conflict]
84
85- name: compilation
86  fields:
87  - name: method_name
88    type: std::string
89  - name: is_osr
90    type: bool
91  - name: bc_size
92    type: size_t
93    dscr: "Bytecode size of the method"
94  - name: address
95    type: uintptr_t
96    dscr: "Address of generated code"
97  - name: code_size
98    type: size_t
99    dscr: "Size of generated code"
100  - name: info_size
101    type: size_t
102    dscr: "Metainfo size for generated code"
103  - name: status
104    type: enum
105    enum: [compiled, failed, dropped, failed_single_impl]
106
107- name: paoc
108  fields:
109  - name: description
110    type: std::string
111
112- name: intrinsic_compilation
113  fields:
114  - name: name
115    type: std::string
116  - name: result
117    type: enum
118    enum: [inlined, inline_failed]
119
120- name: cha_invalidate
121  fields:
122  - name: method
123    type: std::string
124  - name: loaded_class
125    type: std::string
126
127- name: cha_deoptimize
128  fields:
129  - name: method
130    type: std::string
131  - name: in_stack_count
132    type: size_t
133
134- name: interp_profiling
135  fields:
136  - name: action
137    type: enum
138    enum: [start, stop]
139  - name: method
140    type: PandaString
141  - name: vcalls_num
142    type: size_t
143
144- name: method_enter
145  enable: false
146  fields:
147  - name: method
148    type: PandaString
149  - name: kind
150    type: enum
151    enum: [interp, compiled, inlined]
152  - name: depth
153    type: int
154
155- name: method_exit
156  enable: false
157  fields:
158  - name: method
159    type: PandaString
160  - name: kind
161    type: enum
162    enum: [interp, compiled, inlined]
163  - name: depth
164    type: int
165
166- name: tlab_alloc
167  fields:
168  - name: thread_id
169    type: size_t
170  - name: tlab
171    type: size_t
172  - name: allocate_memory
173    type: size_t
174  - name: size
175    type: int
176
177- name: sb_buffer_realloc
178  fields:
179  - name: thread_id
180    type: size_t
181  - name: buffer
182    type: void*
183  - name: length
184    type: size_t
185  - name: elem_size
186    type: size_t
187  - name: obj_size
188    type: size_t
189
190- name: slowpath_alloc
191  fields:
192  - name: thread_id
193    type: size_t
194
195- name: aot_resolve_string
196  fields:
197  - name: value
198    type: PandaString
199
200- name: aot_loaded_for_class
201  fields:
202  - name: filename
203    type: PandaString
204  - name: classname
205    type: PandaString
206
207- name: aot_entrypoint_found
208  fields:
209  - name: methodname
210    type: PandaString
211
212- name: jit_use_resolved_string
213  fields:
214  - name: method_name
215    type: std::string
216  - name: string_id
217    type: int
218
219- name: implicit_nullcheck
220  fields:
221  - name: pc
222    type: uintptr_t
223
224- name: aot_manager
225  fields:
226  - name: aot_file
227    type: std::string
228  - name: action
229    type: enum
230    enum: [added, open_failed, verified, cha_verify_failed, file_verify_failed]
231
232- name: codegen_simplification
233  fields:
234  - name: inst
235    type: enum
236    enum: [checkcast, isinstance]
237  - name: reason
238    type: enum
239    enum: [final_class, skip_nullcheck]
240
241- name: volatile_field
242  fields:
243  - name: method_name
244    type: PandaString
245  - name: class_name
246    type: std::string
247  - name: field_name
248    type: std::string
249