mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
Kernel: Avoid calling characters() where not necessary
This commit is contained in:
parent
4a40caa020
commit
afeee35cbf
2 changed files with 3 additions and 3 deletions
|
@ -221,7 +221,7 @@ void PerformanceEventBuffer::add_process(const Process& process, ProcessEventTyp
|
||||||
|
|
||||||
[[maybe_unused]] auto rc = append_with_eip_and_ebp(process.pid(), 0, 0, 0,
|
[[maybe_unused]] auto rc = append_with_eip_and_ebp(process.pid(), 0, 0, 0,
|
||||||
event_type == ProcessEventType::Create ? PERF_EVENT_PROCESS_CREATE : PERF_EVENT_PROCESS_EXEC,
|
event_type == ProcessEventType::Create ? PERF_EVENT_PROCESS_CREATE : PERF_EVENT_PROCESS_EXEC,
|
||||||
process.pid().value(), 0, executable.characters());
|
process.pid().value(), 0, executable);
|
||||||
|
|
||||||
process.for_each_thread([&](auto& thread) {
|
process.for_each_thread([&](auto& thread) {
|
||||||
[[maybe_unused]] auto rc = append_with_eip_and_ebp(process.pid(), thread.tid().value(),
|
[[maybe_unused]] auto rc = append_with_eip_and_ebp(process.pid(), thread.tid().value(),
|
||||||
|
@ -231,7 +231,7 @@ void PerformanceEventBuffer::add_process(const Process& process, ProcessEventTyp
|
||||||
|
|
||||||
for (auto& region : process.space().regions()) {
|
for (auto& region : process.space().regions()) {
|
||||||
[[maybe_unused]] auto rc = append_with_eip_and_ebp(process.pid(), 0,
|
[[maybe_unused]] auto rc = append_with_eip_and_ebp(process.pid(), 0,
|
||||||
0, 0, PERF_EVENT_MMAP, region->range().base().get(), region->range().size(), region->name().characters());
|
0, 0, PERF_EVENT_MMAP, region->range().base().get(), region->range().size(), region->name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ KResultOr<FlatPtr> Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> u
|
||||||
|
|
||||||
if (auto* event_buffer = current_perf_events_buffer()) {
|
if (auto* event_buffer = current_perf_events_buffer()) {
|
||||||
[[maybe_unused]] auto res = event_buffer->append(PERF_EVENT_MMAP, region->vaddr().get(),
|
[[maybe_unused]] auto res = event_buffer->append(PERF_EVENT_MMAP, region->vaddr().get(),
|
||||||
region->size(), name.is_null() ? region->name().characters() : name.characters());
|
region->size(), name.is_null() ? region->name() : name);
|
||||||
}
|
}
|
||||||
|
|
||||||
region->set_mmap(true);
|
region->set_mmap(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue