summaryrefslogtreecommitdiff
path: root/tools/cpp-define-generator
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2024-07-09 10:31:04 +0000
committer Mythri Alle <mythria@google.com> 2024-07-31 10:15:19 +0000
commit1793c0985d065dd00c0c6ab16af5244f25c4080b (patch)
tree21442b207cffda30dfdfd1aad28ac329f5ac52ba /tools/cpp-define-generator
parent2339531e3a5865f91686a1dc6e0fc24b23936936 (diff)
Add support for the experimental on-demand tracing
This is to support on-demand tracing. This is behind a flag that is disabled by default. This is the initial CL that adds support to ART. There will be a followup CL to add an API that can be used from the frameworks to request a trace of dex methods that got executed. This is different from method tracing in two ways: 1. Method tracing is precise whereas this traces on a best effort basis. 2. Unlike method tracing this uses a circular buffer so can only trace a limited window into the past. Bug: 352518093 Test: art/test.py Change-Id: I8d958dd2ccefe8205a6c05b4daf339ea71b5dbc4
Diffstat (limited to 'tools/cpp-define-generator')
-rw-r--r--tools/cpp-define-generator/thread.def6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/cpp-define-generator/thread.def b/tools/cpp-define-generator/thread.def
index 5cc5f7106e..0d1860d549 100644
--- a/tools/cpp-define-generator/thread.def
+++ b/tools/cpp-define-generator/thread.def
@@ -17,6 +17,7 @@
#if ASM_DEFINE_INCLUDE_DEPENDENCIES
#include "entrypoints/quick/quick_entrypoints_enum.h"
#include "thread.h"
+#include "trace.h"
#endif
ASM_DEFINE(THREAD_CARD_TABLE_OFFSET,
@@ -71,3 +72,8 @@ ASM_DEFINE(THREAD_SHARED_METHOD_HOTNESS_OFFSET,
art::Thread::SharedMethodHotnessOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_TID_OFFSET,
art::Thread::TidOffset<art::kRuntimePointerSize>().Int32Value())
+ASM_DEFINE(TRACE_BUFFER_INIT_OFFSET,
+ art::Thread::TraceBufferPtrOffset<art::kRuntimePointerSize>().Int32Value())
+ASM_DEFINE(TRACE_BUFFER_CURRENT_OFFSET,
+ art::Thread::TraceBufferCurrPtrOffset<art::kRuntimePointerSize>().Int32Value())
+ASM_DEFINE(TRACE_BUFFER_SIZE, (art::kAlwaysOnTraceBufSize - 1) * sizeof(uintptr_t))