[rvm-research] Disable VM shutdown/GC in the end of VM execution

Kenan Liu <[email protected]> Fri, 9 Nov 2018 09:01:28 -0800
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <CA+qhk+pba10UwK=7t9ptrv5pSmxuzoMXxCj_9X=ccvFhjRfhaQ@mail.gmail.com>
--===============0533055427729759661==
Content-Type: multipart/alternative; boundary="0000000000000c6eae057a3e4e23"

--0000000000000c6eae057a3e4e23
Content-Type: text/plain; charset="UTF-8"

Hi,

We have been working on JikesRVM for a while. Our research focuses on the
method level of energy consumption behaviours runs on JikesRVM.

We've added our own energy/hardware counter profiling instrumentations as
IR on top of JIT to collect the data. Recently we got an issue with *data
population in the end of VM execution*. We decided not do data population
during the profiling phase since the extra I/O operations during the
program execution could affect the energy/performance behaviours. So we
plan to populate all data we collected

*in the end of VM execution. *
Firstly, we decided populate our data in the *shutdown()* or *sysExit()*
method of* VM.java*. But it turns out the *data collection (linked list) we
use would be garbage collected even the printout process hasn't been
finished*. We doubted VM would not check if there are any objects are still
active since the program has been finished in the JikesRVM point of view.

We've tried to inserted this code snippet:

*VM.disableGC();*

*LogQueue.dumpLogQueue(Service.clsNameList, Service.methodNameList); //Data
population*
* VM.enableGC();*

around the shutdown() and sysExit() stages. But we can't make it work so
far.

Is there any way that we can let VM wait until our printout finishes before
it shuts down? We have been stuck here for a while. Thank you for any helps
you could provide.

Thanks,
Kenan



-- 
Kenan Liu
PhD Candidate in Computer Science
SUNY Binghamton

--0000000000000c6eae057a3e4e23
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div><d=
iv><div>Hi,<br><br></div>We have been working on JikesRVM for a while. Our =
research focuses on the method level of energy consumption behaviours runs =
on JikesRVM. <br><br></div>We&#39;ve added our own energy/hardware counter =
profiling instrumentations as IR on top of JIT to collect the data. Recentl=
y we got an issue with <b>data population in the end of VM execution</b>. W=
e decided not do data population during the profiling phase since the extra=
 I/O operations during the program execution could affect the energy/perfor=
mance behaviours. So we plan to populate all data we collected <b>in the en=
d of VM execution. <br><br></b></div>Firstly, we decided populate our data =
in the <b>shutdown()</b> or <b>sysExit()</b> method of<b> VM.java</b>. But =
it turns out the <b>data collection (linked list) we use would be garbage c=
ollected even the printout process hasn&#39;t been finished</b>. We doubted=
 VM would not check if there are any objects are still active since the pro=
gram has been finished in the JikesRVM point of view.<br clear=3D"all"><div=
><div><b></b><div><div><div><div><br></div><div>We&#39;ve tried to inserted=
 this code snippet:<br><br><i>
      </i><i>
      </i><table class=3D"gmail-highlight gmail-tab-size gmail-js-file-line=
-container"><tbody><tr><td id=3D"gmail-LC2398" class=3D"gmail-blob-code gma=
il-blob-code-inner gmail-js-file-line">      <i><span class=3D"gmail-pl-c1"=
>VM</span><span class=3D"gmail-pl-k">.</span>disableGC();</i></td></tr><tr>
        </tr></tbody></table><table class=3D"gmail-highlight gmail-tab-size=
 gmail-js-file-line-container"><tbody><tr><td id=3D"gmail-LC2399" class=3D"=
gmail-blob-code gmail-blob-code-inner gmail-js-file-line">      <i><span cl=
ass=3D"gmail-pl-smi">LogQueue</span><span class=3D"gmail-pl-k">.</span>dump=
LogQueue(<span class=3D"gmail-pl-smi">Service</span><span class=3D"gmail-pl=
-k">.</span>clsNameList, <span class=3D"gmail-pl-smi">Service</span><span c=
lass=3D"gmail-pl-k">.</span>methodNameList); //Data population<br></i></td>
      </tr>
      <tr>
        </tr></tbody></table><i>      <span class=3D"gmail-pl-c1">VM</span>=
<span class=3D"gmail-pl-k">.</span>enableGC();</i><br><br></div><div>around=
 the shutdown() and sysExit() stages. But we can&#39;t make it work so far.=
<br><br></div><div>Is there any way that we can let VM wait until our print=
out finishes before it shuts down? We have been stuck here for a while. Tha=
nk you for any helps you could provide.<br><br></div><div>Thanks,<br></div>=
<div>Kenan<br></div><div><br></div><div><br><br></div><div>-- <br><div dir=
=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div>Kenan Liu<br>=
</div>PhD Candidate in Computer Science<br></div>SUNY Binghamton<br></div><=
/div></div></div></div></div></div></div></div></div></div></div>

--0000000000000c6eae057a3e4e23--


--===============0533055427729759661==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============0533055427729759661==
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

--===============0533055427729759661==--