mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
0f393148da
Instead of saying "main +39" and "main +57" etc, we now have a separate field in /proc/profile for the offset-into-the-symbol.
27 lines
482 B
C++
27 lines
482 B
C++
#pragma once
|
|
|
|
#include <AK/Function.h>
|
|
#include <AK/String.h>
|
|
#include <AK/Types.h>
|
|
|
|
class Process;
|
|
|
|
namespace Profiling {
|
|
|
|
constexpr size_t max_stack_frame_count = 30;
|
|
|
|
struct Sample {
|
|
i32 pid;
|
|
i32 tid;
|
|
u64 timestamp;
|
|
u32 frames[max_stack_frame_count];
|
|
u32 offsets[max_stack_frame_count];
|
|
String symbolicated_frames[max_stack_frame_count];
|
|
};
|
|
|
|
Sample& next_sample_slot();
|
|
void start(Process&);
|
|
void stop();
|
|
void for_each_sample(Function<void(Sample&)>);
|
|
|
|
}
|