# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # To add new event, create new record in the 'events' section with following fields: # - name - name of the event # - fields - data fields that will be stored within event. The type of each field should be a real C++ type, except enum. # Then you can dump your event by writing EVENT_(values). For example, for 'osr_entry' event it will be: # EVENT_OSR_ENTRY(method->GetFullName(), bc, events::OsrEntryKind::TOP_FRAME, events::OsrEntryResult::SUCCESS) # # There are may be several backends(streams) for events, such as csv file, memory, etc. # Backend can be chosen in runtime by invoking Events::Create(). # The following streams are currently available: # - EventsMemory: store events in the heap memory, useful for tests. # - EventsCsv: dump events to the csv file, useful for statistics gathering. # events: - name: osr_entry fields: - name: method_name type: std::string - name: bc_offset type: size_t - name: kind type: enum enum: [after_cframe, after_iframe, top_frame] - name: result type: enum enum: [success, error] - name: inline fields: - name: caller type: std::string - name: callee type: std::string - name: call_inst_id type: int - name: kind type: enum enum: [static, virtual, virtual_cha, virtual_monomorphic, virtual_polymorphic] - name: result type: enum enum: [success, fail, fail_resolve, fail_megamorphic, unsuitable, noinline, lost_single_impl, limit, devirtualized, inf_loop, skip_external] - name: deoptimization fields: - name: method_name type: std::string - name: pc type: uintptr_t - name: after type: enum enum: [cframe, iframe, top] - name: exception fields: - name: method_name type: std::string - name: pc type: size_t - name: npc type: size_t - name: type type: enum enum: [null_check, bound_check, negative_size, native, throw, abstract_method, arithmetic, instantiation_error, cast_check, stack_overflow, icce_method_conflict] - name: compilation fields: - name: method_name type: std::string - name: is_osr type: bool - name: bc_size type: size_t dscr: "Bytecode size of the method" - name: address type: uintptr_t dscr: "Address of generated code" - name: code_size type: size_t dscr: "Size of generated code" - name: info_size type: size_t dscr: "Metainfo size for generated code" - name: status type: enum enum: [compiled, failed, dropped, failed_single_impl] - name: paoc fields: - name: description type: std::string - name: intrinsic_compilation fields: - name: name type: std::string - name: result type: enum enum: [inlined, inline_failed] - name: cha_invalidate fields: - name: method type: std::string - name: loaded_class type: std::string - name: cha_deoptimize fields: - name: method type: std::string - name: in_stack_count type: size_t - name: interp_profiling fields: - name: action type: enum enum: [start, stop] - name: method type: PandaString - name: vcalls_num type: size_t - name: method_enter enable: false fields: - name: method type: PandaString - name: kind type: enum enum: [interp, compiled, inlined] - name: depth type: int - name: method_exit enable: false fields: - name: method type: PandaString - name: kind type: enum enum: [interp, compiled, inlined] - name: depth type: int - name: tlab_alloc fields: - name: thread_id type: size_t - name: tlab type: size_t - name: instruction type: PandaString - name: allocate_memory type: size_t - name: size type: int - name: slowpath_alloc fields: - name: thread_id type: size_t - name: aot_resolve_string fields: - name: value type: PandaString - name: aot_loaded_for_class fields: - name: filename type: PandaString - name: classname type: PandaString - name: aot_entrypoint_found fields: - name: methodname type: PandaString - name: jit_use_resolved_string fields: - name: method_name type: std::string - name: string_id type: int - name: implicit_nullcheck fields: - name: pc type: uintptr_t - name: aot_manager fields: - name: aot_file type: std::string - name: action type: enum enum: [added, open_failed, verified, cha_verify_failed, file_verify_failed] - name: codegen_simplification fields: - name: inst type: enum enum: [checkcast, isinstance] - name: reason type: enum enum: [final_class, skip_nullcheck]