Profiler: Correct the event names for 'malloc' and 'free'

These were renamed to 'kmalloc' and 'kfree' in the profile recording
infrastructure, but the Profiler application expected the old names
still.
This commit is contained in:
Ali Mohammad Pur 2023-07-28 20:53:23 +03:30 committed by Andreas Kling
parent 7a471b7cf5
commit a539c261b1
Notes: sideshowbarker 2024-07-17 18:13:59 +09:00

View File

@ -288,12 +288,12 @@ ErrorOr<NonnullOwnPtr<Profile>> Profile::load_from_perfcore_file(StringView path
if (type_string == "sample"sv) {
event.data = Event::SampleData {};
} else if (type_string == "malloc"sv) {
} else if (type_string == "kmalloc"sv) {
event.data = Event::MallocData {
.ptr = perf_event.get_addr("ptr"sv).value_or(0),
.size = perf_event.get_integer<size_t>("size"sv).value_or(0),
};
} else if (type_string == "free"sv) {
} else if (type_string == "kfree"sv) {
event.data = Event::FreeData {
.ptr = perf_event.get_addr("ptr"sv).value_or(0),
};