mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Kernel: Reset profiling state on exec() (but keep it going)
We now log the new executable on exec() and throw away all the samples we've accumulated so far. But profiling keeps going.
This commit is contained in:
parent
647d0b9e0f
commit
d7a13dbaa7
3 changed files with 10 additions and 0 deletions
|
@ -90,6 +90,12 @@ void stop()
|
|||
s_process = nullptr;
|
||||
}
|
||||
|
||||
void did_exec(const String& new_executable_path)
|
||||
{
|
||||
executable_path() = new_executable_path;
|
||||
s_next_slot_index = 0;
|
||||
}
|
||||
|
||||
void for_each_sample(Function<void(Sample&)> callback)
|
||||
{
|
||||
for (size_t i = 0; i < s_next_slot_index; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue