summaryrefslogtreecommitdiffstats
path: root/runtime/jit/profiling_info.h
diff options
context:
space:
mode:
authorDan Pasanen <invisiblek@cyanogenmod.org>2016-12-06 19:30:12 -0600
committerDan Pasanen <invisiblek@cyanogenmod.org>2016-12-06 19:32:30 -0600
commit58d4793f8bd82b9daab5bf4fa40d5b68204e71eb (patch)
tree449265cbacbf925f37ed0bd201e68f080e2537cc /runtime/jit/profiling_info.h
parent20af13267def46b2e5f9a6fa6e94ac69056ef16f (diff)
parent12eb0c532e33ca5d5e98addd580b5ad0a4b71be4 (diff)
downloadandroid_art-cm-14.1_prerebase.tar.gz
android_art-cm-14.1_prerebase.tar.bz2
android_art-cm-14.1_prerebase.zip
Merge tag 'android-7.1.1_r4' into cm-14.1cm-14.1_prerebase
Android 7.1.1 release 4 Change-Id: I14b36666b5a478024f3a9ffab90fd675a6157461
Diffstat (limited to 'runtime/jit/profiling_info.h')
-rw-r--r--runtime/jit/profiling_info.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/runtime/jit/profiling_info.h b/runtime/jit/profiling_info.h
index d04d2de756..a890fbb96d 100644
--- a/runtime/jit/profiling_info.h
+++ b/runtime/jit/profiling_info.h
@@ -105,6 +105,7 @@ class ProfilingInfo {
// NO_THREAD_SAFETY_ANALYSIS since we don't know what the callback requires.
template<typename RootVisitorType>
void VisitRoots(RootVisitorType& visitor) NO_THREAD_SAFETY_ANALYSIS {
+ visitor.VisitRootIfNonNull(holding_class_.AddressWithoutBarrier());
for (size_t i = 0; i < number_of_inline_caches_; ++i) {
InlineCache* cache = &cache_[i];
for (size_t j = 0; j < InlineCache::kIndividualCacheSize; ++j) {
@@ -166,18 +167,7 @@ class ProfilingInfo {
}
private:
- ProfilingInfo(ArtMethod* method, const std::vector<uint32_t>& entries)
- : number_of_inline_caches_(entries.size()),
- method_(method),
- is_method_being_compiled_(false),
- is_osr_method_being_compiled_(false),
- current_inline_uses_(0),
- saved_entry_point_(nullptr) {
- memset(&cache_, 0, number_of_inline_caches_ * sizeof(InlineCache));
- for (size_t i = 0; i < number_of_inline_caches_; ++i) {
- cache_[i].dex_pc_ = entries[i];
- }
- }
+ ProfilingInfo(ArtMethod* method, const std::vector<uint32_t>& entries);
// Number of instructions we are profiling in the ArtMethod.
const uint32_t number_of_inline_caches_;
@@ -185,6 +175,9 @@ class ProfilingInfo {
// Method this profiling info is for.
ArtMethod* const method_;
+ // Holding class for the method in case method is a copied method.
+ GcRoot<mirror::Class> holding_class_;
+
// Whether the ArtMethod is currently being compiled. This flag
// is implicitly guarded by the JIT code cache lock.
// TODO: Make the JIT code cache lock global.