summaryrefslogtreecommitdiff
path: root/runtime/thread.h
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2025-01-13 12:00:33 +0000
committer Mythri Alle <mythria@google.com> 2025-01-24 01:05:24 -0800
commit1a9a8abf19e7641149fcaed3971bf0aa99f4dfb8 (patch)
tree74cc6c1c49a2fe36b29807ed2256b26073df9628 /runtime/thread.h
parent2576b59a2dad4ee542eb50fb451ff88a4b8902ad (diff)
Use nanoseconds for v2 method tracing
Update the precision of timestamps to be nanoseconds and use nanosecond precision in method trace format v2. For format v1 we use microsecond precision for backwards compatability. Bug: 259258187 Test: art/test.py -t 2246 Change-Id: I099e21f5d143c5444193e7886b5281b32f87d5d3
Diffstat (limited to 'runtime/thread.h')
-rw-r--r--runtime/thread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/thread.h b/runtime/thread.h
index be4ffd0bc2..4a675d4c99 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -643,6 +643,9 @@ class EXPORT Thread {
// Returns the thread-specific CPU-time clock in microseconds or -1 if unavailable.
uint64_t GetCpuMicroTime() const;
+ // Returns the thread-specific CPU-time clock in nanoseconds or -1 if unavailable.
+ uint64_t GetCpuNanoTime() const;
+
mirror::Object* GetPeer() const REQUIRES_SHARED(Locks::mutator_lock_) {
DCHECK(Thread::Current() == this) << "Use GetPeerFromOtherThread instead";
CHECK(tlsPtr_.jpeer == nullptr);