Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp @ 11068:b30744960351
8014022: G1: Non Java threads should lock the shared SATB queue lock without safepoint checks.
Reviewed-by: tschatzl, brutisso, jmasa, ysr
Contributed-by: per.liden@oracle.com
author | brutisso |
---|---|
date | Sun, 30 Jun 2013 21:42:07 +0200 |
parents | f34d701e952e |
children | 190899198332 d55c004e1d4d |
comparison
equal
deleted
inserted
replaced
11067:3ea89789ba39 | 11068:b30744960351 |
---|---|
45 Thread* thr = Thread::current(); | 45 Thread* thr = Thread::current(); |
46 if (thr->is_Java_thread()) { | 46 if (thr->is_Java_thread()) { |
47 JavaThread* jt = (JavaThread*)thr; | 47 JavaThread* jt = (JavaThread*)thr; |
48 jt->satb_mark_queue().enqueue(pre_val); | 48 jt->satb_mark_queue().enqueue(pre_val); |
49 } else { | 49 } else { |
50 MutexLocker x(Shared_SATB_Q_lock); | 50 MutexLockerEx x(Shared_SATB_Q_lock, Mutex::_no_safepoint_check_flag); |
51 JavaThread::satb_mark_queue_set().shared_satb_queue()->enqueue(pre_val); | 51 JavaThread::satb_mark_queue_set().shared_satb_queue()->enqueue(pre_val); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 template <class T> void | 55 template <class T> void |