mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
UserspaceEmulator+LibC: Add support for Region-of-Interest profiling
This commit is contained in:
parent
18b2484985
commit
64ccf2196c
6 changed files with 51 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
|||
extern bool g_dump_profile;
|
||||
extern unsigned g_profile_instruction_interval;
|
||||
extern Optional<OutputFileStream> g_profile_stream;
|
||||
extern bool g_in_region_of_interest;
|
||||
|
||||
namespace UserspaceEmulator {
|
||||
|
||||
|
@ -473,6 +474,8 @@ void Emulator::dump_backtrace()
|
|||
|
||||
void Emulator::emit_profile_sample(AK::OutputStream& output)
|
||||
{
|
||||
if (!g_in_region_of_interest)
|
||||
return;
|
||||
StringBuilder builder;
|
||||
timeval tv {};
|
||||
gettimeofday(&tv, nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue