Commit 39100372 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Use GC critical section for profile saver

Since visit classes uses DecodeWeakGlobal, it may block on decoding
weak globals. This can cause deadlocks since it will be blocked while
holding the classlinker classes lock.

Using a GC critical section ensures that the GC is not running while
we visit the classes for the profile saver.

I didn't put the logic in the VisitClasses call since some of the
callers already have no thread suspension checks that would fail from
this.

Bug: 38350590
Test: test-art-host ART_TEST_JIT=true

Change-Id: I1a529c4ec6b53c1979390741afc767d09a1faae0
parent 7974468d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment