Re: [rvm-research] Exception while executing Junit Test Cases while running pre-commit
Pushparaj Motamari <[email protected]>
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <CAKO14CWNbEQJ_R9sDaAQ1o909-6AORzUN7FNR=JrF5dPZckmow@mail.gmail.com> |
Hi Erik,
Thank you for the suggestions.
I try to reserve one extra localWords for storing "this" reference. I have
added some extra check in some methods as suggested by Michel Bond, and the
precommit went successful for prototype but when I run precommit for
developement configuration, by the command
bin/buildit --test-run pre-commit --java-home /usr/local/jdk1.6.0_37
localhost development
some tests were failed, I am attaching the build-test results when
precommit is run for development configuration.
I have changed following files in Jikes RVM
NormalMethod.java
public int getLocalWords() {
- return localWords;//removed this line.
+ return localWords+1;//added this line.
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BaseLineCompilerImpl.java
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The new genMonitorEnter() and genMonitorExit() methods are
private void genMonitorEnter() {
if (method.isStatic()) {
Offset klassOffset =
Offset.fromIntSignExtend(Statics.findOrCreateObjectLiteral(klass.getClassForType()));
// push java.lang.Class object for klass
asm.emitPUSH_Abs(Magic.getTocPointer().plus(klassOffset));
//
asm.emitPOP_RegDisp(ESP,localOffset(method.getLocalWords()-1).plus(WORDSIZE));
} else {
if
(!(method.getDeclaringClass().getDescriptor().isBootstrapClassDescriptor()
||method.getDeclaringClass().getDescriptor().isRVMDescriptor()
||method.getDeclaringClass().getDescriptor().isReservedMemberName()
||method.getDeclaringClass().getDescriptor().isAnnotationClass()))
{
asm.emitMOV_Reg_RegDisp(T0, ESP, localOffset(0));
asm.emitMOV_RegDisp_Reg(ESP, localOffset(method.getLocalWords()-1), T0);
asm.emitPUSH_RegDisp(ESP, localOffset(0));
}else{
asm.emitPUSH_RegDisp(ESP, localOffset(0));
}
}
// pass 1 parameter
genParameterRegisterLoad(asm, 1);
asm.emitCALL_Abs(Magic.getTocPointer().plus(Entrypoints.lockMethod.getOffset()));
// after this instruction, the method has the monitor
lockOffset = asm.getMachineCodeIndex();
}
private void genMonitorExit() {
if (method.isStatic()) {
Offset klassOffset =
Offset.fromIntSignExtend(Statics.findOrCreateObjectLiteral(klass.getClassForType()));
// push java.lang.Class object for klass
asm.emitPUSH_Abs(Magic.getTocPointer().plus(klassOffset));
} else {
if
(!(method.getDeclaringClass().getDescriptor().isBootstrapClassDescriptor()
||method.getDeclaringClass().getDescriptor().isRVMDescriptor()
||method.getDeclaringClass().getDescriptor().isReservedMemberName()
||method.getDeclaringClass().getDescriptor().isAnnotationClass()))
{
asm.emitPUSH_RegDisp(ESP, localOffset(method.getLocalWords()-1));
}else{
asm.emitPUSH_RegDisp(ESP, localOffset(0));
}
//asm.emitPUSH_RegDisp(ESP, localOffset(0)); //
push "this" object
}
genParameterRegisterLoad(asm, 1); // pass 1 parameter
asm.emitCALL_Abs(Magic.getTocPointer().plus(Entrypoints.unlockMethod.getOffset()));
}
###############################################
Changes in GenerationContext.java
-----------------------------------------------------------------------
The diff file and the new file attached with the mail.
##################Test Results for precommit development version
####################33
init:
[mkdir] Created dir:
/home/pushparaj/UnMd/target/tests/pre-commit/development/dacapo
[mkdir] Created dir:
/home/pushparaj/UnMd/results/buildit/localhost-2013-04-27-Sat-13-09-06/tests/pre-commit/development/dacapo
extract-xalan-jar:
[unzip] Expanding:
/home/pushparaj/UnMd/components/dacapo/2006-10-MR2/dacapo.jar into
/home/pushparaj/UnMd/target/tests/pre-commit/development/dacapo
test:
[echo] Test Result for [development|dacapo] antlr (default) : SUCCESS
[echo] Test Result for [development|dacapo] bloat (default) : SUCCESS
[touch] Creating
/home/pushparaj/UnMd/results/buildit/localhost-2013-04-27-Sat-13-09-06/tests/pre-commit/development/dacapo/chart.default-output.txt
[echo] Test Result for [development|dacapo] chart (default) : EXCLUDED
Test excluded.
[exec] Result: 124
[echo] Test Result for [development|dacapo] eclipse (default) :
FAILURE Unexpected exit code.
[echo] Test Result for [development|dacapo] fop (default) : SUCCESS
[exec] Result: 254
[echo] Test Result for [development|dacapo] hsqldb (default) : FAILURE
Unexpected exit code.
[exec] Result: 255
[echo] Test Result for [development|dacapo] jython (default) : FAILURE
Unexpected exit code.
[echo] Test Result for [development|dacapo] luindex (default) :
SUCCESS
[echo] Test Result for [development|dacapo] lusearch (default) :
SUCCESS
[echo] Test Result for [development|dacapo] pmd (default) : SUCCESS
[exec] Result: 254
[echo] Test Result for [development|dacapo] xalan (default) : FAILURE
Unexpected exit code.
#####----The complete exception information is attached with the mail as
development.xml
Thank You
Pushparaj
On Sat, Apr 27, 2013 at 10:56 PM, Erik Brangs <[email protected]> wrote:
> Hi,
>
> On 27.04.2013 13:07, Pushparaj Motamari wrote:
> > I have modified the Jikes, and this is exception is not shown when I do
> > wth unmodified VM
>
> In this case, you can use the unmodified Jikes RVM (or a modified
> version in which the problem does not occur) as a basis for getting a
> diff. Once you have a diff, you can narrow it down until you have
> isolated the code changes that caused the problem. Then you "only" need
> to find out why the changes are a problem.
>
> >From your earlier mails I take it that you are doing some kind of
> instrumentation. In that case, one possibility is that you're
> instrumenting code that you don't want to (or should not) instrument.
> Michael Bond has already mentioned some useful conditions that you can
> check in the compiler to determine if you're instrested in the code in
> question (see the mailing list thread about VM.sysWriteln()).
> Additionally, you can also check if the compilers are being run during
> bootimage writing or at runtime by checking VM.RunningVM.
>
> IMHO the easiest way to debug the RVM code is to use assertions and
> printouts to figure out what is going on. Some of the command line
> options that the Jikes RVM provides may also be useful.
>
> When making changes, it's advisable to take small steps. If you can test
> your changes using automated tests, you should do so because it'll
> probably save you time in the long run.
>
> I'm afraid I can't give you any more specific advice without any
> knowledge about the modifications you have done to the Jikes RVM.
>
>
> Kind regards,
>
> Erik Brangs
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
development.xml
(text/xml, 170.4 KB) - not displayed
diff_file
(application/octet-stream, 3.3 KB) - not displayed
GenerationContext.java
(application/octet-stream, 31.5 KB) - not displayed