diff options
author | Eric Holk <eholk@google.com> | 2021-01-20 22:24:06 +0000 |
---|---|---|
committer | Eric Holk <eholk@google.com> | 2021-01-21 18:16:38 +0000 |
commit | 0b986f73e018fe55af1d71d2f8deaa61bd6840a2 (patch) | |
tree | ac0626c2b722d7bdec205eda84fbf807621d35fa /openjdkjvmti | |
parent | b8686ce4c93eba7192ed7ef89e7ffd9f3aa6cd07 (diff) |
Revert^4 "[metrics] Add background reporting thread"
This adds a background thread that reports metrics every N seconds,
where N is specified by the -Xmetrics-reporting-period command line
option. Periodic reporting is disabled by default.
This reverts commit 1060838894e34785139b5e3583fbc9edad7fa7f9.
Reason for revert: Remove problematic test
Test: test/run-test --host 2233-metrics-background-thread
Test: adb shell stop && \
adb shell setprop dalvik.vm.extra-opts \
-Xmetrics-reporting-period=30\\\ -Xwrite-metrics-to-log && \
adb shell start && \
adb logcat # observe metrics in log
Bug: 170149255
Change-Id: I3d72043bbb1e652728253585aae5486598658d2b
Diffstat (limited to 'openjdkjvmti')
-rw-r--r-- | openjdkjvmti/ti_thread.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openjdkjvmti/ti_thread.cc b/openjdkjvmti/ti_thread.cc index 1a5b227ffc..98a0b9da9b 100644 --- a/openjdkjvmti/ti_thread.cc +++ b/openjdkjvmti/ti_thread.cc @@ -39,12 +39,13 @@ #include "base/mutex.h" #include "deopt_manager.h" #include "events-inl.h" -#include "gc/system_weak.h" #include "gc/collector_type.h" #include "gc/gc_cause.h" #include "gc/scoped_gc_critical_section.h" +#include "gc/system_weak.h" #include "gc_root-inl.h" #include "jni/jni_internal.h" +#include "metrics/metrics.h" #include "mirror/class.h" #include "mirror/object-inl.h" #include "mirror/string.h" @@ -123,13 +124,12 @@ struct ThreadCallback : public art::ThreadLifecycleCallback { if (!started) { // Runtime isn't started. We only expect at most the signal handler or JIT threads to be // started here; this includes the perfetto_hprof_listener signal handler thread for - // perfetto_hprof. + // perfetto_hprof, as well as the metrics background reporting thread. if (art::kIsDebugBuild) { std::string name; self->GetThreadName(name); - if (name != "JDWP" && - name != "Signal Catcher" && - name != "perfetto_hprof_listener" && + if (name != "JDWP" && name != "Signal Catcher" && name != "perfetto_hprof_listener" && + name != art::metrics::MetricsReporter::kBackgroundThreadName && !android::base::StartsWith(name, "Jit thread pool") && !android::base::StartsWith(name, "Runtime worker thread")) { LOG(FATAL) << "Unexpected thread before start: " << name << " id: " |