Re: [rvm-research] Does GC stop a muatator thread that executes in JNI context?
"David P Grove" <[email protected]> Fri, 19 Oct 2018 09:00:29 -0400
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <OF5C954E47.1DA91C74-ON8525832B.0046FEE0-8525832B.004774D3@notes.na.collabserv.com> |
--===============5407654826938231235== Content-type: multipart/alternative; boundary="0__=0ABB09B8DFD578708f9e8a93df938690918c0ABB09B8DFD57870" Content-Disposition: inline --0__=0ABB09B8DFD578708f9e8a93df938690918c0ABB09B8DFD57870 Content-Transfer-Encoding: quoted-printable Content-type: text/plain; charset=ISO-8859-1 Lingyu Zhu <[email protected]> wrote on 10/19/2018 08:22:14 AM: > > Hi, all. I leared that mutator threads stop at safe points if a GC > request is in pending. Since JNI > code is compiled by native language compiler,=A0 no safe points is > inserted in JNI codes. Therefore my question is: can a thread > currently in JNI context be stoped, if it can do so, which points > are the proper location for the thread stop at? > Hi, All transitions to/from JNI are GC safe points. Although we cannot actually stop a thread running in native code, we can pause it when it attempts to return to executing Java code. So from the perspective of GC safety, any thread running in native code can be ignored (it can't access the Java heap without Jikes RVM's permission). --dave --0__=0ABB09B8DFD578708f9e8a93df938690918c0ABB09B8DFD57870 Content-Transfer-Encoding: quoted-printable Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline <html><body><p><tt><font size=3D"2">Lingyu Zhu <[email protected]> w= rote on 10/19/2018 08:22:14 AM:</font></tt><br><tt><font size=3D"2">> <b= r>> Hi, all. I leared that mutator threads stop at safe points if a GC <= br>> request is in pending. Since JNI</font></tt><br><tt><font size=3D"2= ">> code is compiled by native language compiler,=A0 no safe points is <= br>> inserted in JNI codes. Therefore my question is: can a thread <br>&= gt; currently in JNI context be stoped, if it can do so, which points <br>&= gt; are the proper location for the thread stop at?=A0<br>></font></tt><= br><br><tt><font size=3D"2">Hi,</font></tt><br><br><tt><font size=3D"2"> = All transitions to/from JNI are GC safe points. Although we cann= ot actually stop a thread running in native code, we can pause it when it a= ttempts to return to executing Java code. So from the perspective of = GC safety, any thread running in native code can be ignored (it can't acces= s the Java heap without Jikes RVM's permission).</font></tt><br><br><tt><fo= nt size=3D"2">--dave</font></tt><br><BR> </body></html> --0__=0ABB09B8DFD578708f9e8a93df938690918c0ABB09B8DFD57870-- --===============5407654826938231235== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5407654826938231235== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers --===============5407654826938231235==--