Integrated Chrome tracing

Added support for chrome tracing by integrating the
minitrace library (github.com/hrydgard/minitrace),
and modified it with a background flushing thread that allows
tracing to continue automatically after the predefined
1 million event limit.

Menu items and an accelerator (Ctr+T) have also been
added. Starting and stopping the trace simply replaces
trace.json with the new trace data.

The feature is disabled by default. Pass MINITRACE=y
to the build command to enable it. Some traces are
already added as an example, however they won't have
any effect if the feature is disabled.
This commit is contained in:
luisjoseromero
2021-02-10 20:22:51 +00:00
parent 16b321d12e
commit c0e7ac3762
12 changed files with 904 additions and 3 deletions

View File

@@ -89,6 +89,9 @@ int dopause, /* system is paused */
uint64_t timer_freq;
char emu_version[200]; /* version ID string */
#ifdef MTR_ENABLED
int tracing_on = 0;
#endif
/* Commandline options. */
int dump_on_exit = 0; /* (O) dump regs on exit */