Other threads may see the ProfilingInfo pointer in the ArtMethod,
but the data they have for it is bogus due to a prior load in their
cache.
bug:
26221227
Change-Id: I1fa8f088a3144df39d07a986ed57d6fc20edba18
return nullptr;
}
info = new (data) ProfilingInfo(method, entries);
+
+ // Make sure other threads see the data in the profiling info object before the
+ // store in the ArtMethod's ProfilingInfo pointer.
+ QuasiAtomic::ThreadFenceRelease();
+
method->SetProfilingInfo(info);
profiling_infos_.push_back(info);
return info;