mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
Kernel: Don't wrap AddressSpace's RegionTree in SpinlockProtected
Now that AddressSpace itself is always SpinlockProtected, we don't need to also wrap the RegionTree. Whoever has the AddressSpace locked is free to poke around its tree.
This commit is contained in:
parent
d3e8eb5918
commit
da24a937f5
6 changed files with 212 additions and 265 deletions
|
@ -352,14 +352,12 @@ ErrorOr<void> PerformanceEventBuffer::add_process(Process const& process, Proces
|
|||
});
|
||||
TRY(result);
|
||||
|
||||
return process.address_space().with([&](auto& space) {
|
||||
return space->region_tree().with([&](auto& region_tree) -> ErrorOr<void> {
|
||||
for (auto const& region : region_tree.regions()) {
|
||||
TRY(append_with_ip_and_bp(process.pid(), 0,
|
||||
0, 0, PERF_EVENT_MMAP, 0, region.range().base().get(), region.range().size(), region.name()));
|
||||
}
|
||||
return {};
|
||||
});
|
||||
return process.address_space().with([&](auto& space) -> ErrorOr<void> {
|
||||
for (auto const& region : space->region_tree().regions()) {
|
||||
TRY(append_with_ip_and_bp(process.pid(), 0,
|
||||
0, 0, PERF_EVENT_MMAP, 0, region.range().base().get(), region.range().size(), region.name()));
|
||||
}
|
||||
return {};
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue