Kernel: Pass RegisterState by ref to event buffer

This commit is contained in:
James Mintram 2021-10-11 23:52:44 +01:00 committed by Brian Gianforcaro
parent a4509ba633
commit a8e5130183
Notes: sideshowbarker 2024-07-18 02:48:09 +09:00
2 changed files with 4 additions and 7 deletions

View File

@ -7,8 +7,8 @@
#include <AK/JsonArraySerializer.h>
#include <AK/JsonObjectSerializer.h>
#include <AK/ScopeGuard.h>
#include <Kernel/Arch/x86/SmapDisabler.h>
#include <Kernel/Arch/x86/RegisterState.h>
#include <Kernel/Arch/x86/SmapDisabler.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/KBufferBuilder.h>
#include <Kernel/PerformanceEventBuffer.h>

View File

@ -62,8 +62,7 @@ public:
return;
if (auto* event_buffer = current_thread.process().current_perf_events_buffer()) {
[[maybe_unused]] auto rc = event_buffer->append_with_ip_and_bp(
current_thread.pid(), current_thread.tid(),
regs.ip(), regs.bp(), PERF_EVENT_SAMPLE, lost_time, 0, 0, nullptr);
current_thread.pid(), current_thread.tid(), regs, PERF_EVENT_SAMPLE, lost_time, 0, 0, nullptr);
}
}
@ -114,8 +113,7 @@ public:
return;
if (auto* event_buffer = thread.process().current_perf_events_buffer()) {
[[maybe_unused]] auto rc = event_buffer->append_with_ip_and_bp(
thread.pid(), thread.tid(),
regs.ip(), regs.bp(), PERF_EVENT_PAGE_FAULT, 0, 0, 0, nullptr);
thread.pid(), thread.tid(), regs, PERF_EVENT_PAGE_FAULT, 0, 0, 0, nullptr);
}
}
@ -125,8 +123,7 @@ public:
return;
if (auto* event_buffer = thread.process().current_perf_events_buffer()) {
[[maybe_unused]] auto rc = event_buffer->append_with_ip_and_bp(
thread.pid(), thread.tid(),
regs.ip(), regs.bp(), PERF_EVENT_SYSCALL, 0, 0, 0, nullptr);
thread.pid(), thread.tid(), regs, PERF_EVENT_SYSCALL, 0, 0, 0, nullptr);
}
}