summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2023-03-30 17:56:24 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2023-04-04 09:39:11 +0000
commit88b9d89098a2556f39a104ffe389f38d2ecfc3a6 (patch)
treec805ad19f2ef3d12cba49da4c77085527f8e3a29 /runtime/class_linker.cc
parent41c3de26503b7e9ff8cd3dd480cf12a8cca8af83 (diff)
Add trace points for class loading.
To augment traces and debug potential class loading hotspots. Test: m Change-Id: Iefb33e90e21ee1c597f6e4accd4cca83245fbd6e
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index da7b845d67..cdd07f6e40 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3351,6 +3351,7 @@ ObjPtr<mirror::Class> ClassLinker::DefineClass(Thread* self,
Handle<mirror::ClassLoader> class_loader,
const DexFile& dex_file,
const dex::ClassDef& dex_class_def) {
+ ScopedTrace trace([&]() { return android::base::StringPrintf("Defining %s", descriptor); });
ScopedDefiningClass sdc(self);
StackHandleScope<3> hs(self);
metrics::AutoTimer timer{GetMetrics()->ClassLoadingTotalTime()};