5 #ifndef V8_PROFILER_PROFILER_LISTENER_H_ 6 #define V8_PROFILER_PROFILER_LISTENER_H_ 11 #include "src/code-events.h" 12 #include "src/profiler/profile-generator.h" 17 class CodeEventsContainer;
18 class CodeDeoptEventRecord;
31 void CallbackEvent(
Name name,
Address entry_point)
override;
32 void CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
34 void CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
36 void CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
38 Name script_name)
override;
39 void CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
41 Name script_name,
int line,
int column)
override;
42 void CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
46 void CodeMovingGCEvent()
override {}
50 void CodeDeoptEvent(
Code code, DeoptimizeKind kind,
Address pc,
51 int fp_to_sp_delta)
override;
52 void GetterCallbackEvent(
Name name,
Address entry_point)
override;
54 void SetterCallbackEvent(
Name name,
Address entry_point)
override;
55 void SharedFunctionInfoMoveEvent(
Address from,
Address to)
override {}
58 CodeEventListener::LogEventsAndTags tag,
const char* name,
59 const char* resource_name = CodeEntry::kEmptyResourceName,
60 int line_number = v8::CpuProfileNode::kNoLineNumberInfo,
61 int column_number = v8::CpuProfileNode::kNoColumnNumberInfo,
62 std::unique_ptr<SourcePositionTable> line_info =
nullptr,
63 Address instruction_start = kNullAddress);
65 const char* GetName(
Name name) {
66 return function_and_resource_names_.GetName(name);
68 const char* GetName(
int args_count) {
69 return function_and_resource_names_.GetName(args_count);
71 const char* GetName(
const char* name) {
72 return function_and_resource_names_.GetCopy(name);
74 const char* GetConsName(
const char* prefix,
Name name) {
75 return function_and_resource_names_.GetConsName(prefix, name);
83 observer_->CodeEventHandler(evt_rec);
96 #endif // V8_PROFILER_PROFILER_LISTENER_H_