« Return to Thread: [rvm-research] Log.write()

Re: [rvm-research] Log.write()

by Cristian Perfumo :: Rate this Message:

Reply to Author | View in Thread

Filip,

Thanks once again. Your last line was the answer: I was using write instead of writeln. Now everything works as expected!

Regards

Cristian

On Fri, Jun 12, 2009 at 5:07 PM, Filip Pizlo <pizlo@...> wrote:
Ah - got it.  You're in MMTk land, not Jikes RVM land.  While hacking MMTk code, you want to steer clear of Jikes RVM APIs as much as possible, since MMTk is meant to be portable to other VMs.  In this case, that separation is enforced, and so you're getting a compile error.

Going back to your original question, I don't understand why MMTk's Log.write isn't working for you.  It should print regardless of log level.  To test that, just to make sure, I added the following to MSCollector.collectionPhase():

public void collectionPhase(short phaseId, boolean primary) {
    Log.writeln("I'm in collectionPhase.");
    ... // other stuff as before

And indeed, on every collection, regardless of command-line verbosity options, it prints "I'm in collectionPhase."  Perhaps, you are not using writeln(), or else are turning off flushing somehow?

-F



On Jun 12, 2009, at 10:56 , Cristian Perfumo wrote:

Thanks Filip,

Now a successive question: I want to print something in a method of org.mmtk.plan.generational.GenMutator.java. When I try org.jikesrvm.VM.sysWriteln("Inside fastPath");
I get this error message when trying to build with ant:

    [javac] /home/cperfumo/jikes/jikesrvm-3.0.1/MMTk/src/org/mmtk/plan/generational/GenMutator.java:162: package org.jikesrvm does not exist
    [javac]       org.jikesrvm.VM.sysWriteln("Inside fastPath");

 
Any help on how to deal with this?

Thanks.

Cristian



On Fri, Jun 12, 2009 at 4:29 PM, Filip Pizlo <pizlo@...> wrote:
Hi Cristian,

I usually use VM.sysWriteln().  You can also use VM.tsysWriteln() to
get the thread ID prefixed to your message (useful for debugging multi-
threaded stuff).

-Filip




On Jun 12, 2009, at 10:17 , Cristian Perfumo wrote:

> Hi!
> I am a newbie to Jikes and just started playing around with it.
>
> I wanted to add some log messages using Log.write() but it looks like
> they will be shown depending on the -verbose option you choose. (If I
> execute without any -verbose, nothing gets shown). How do I print
> something on the screen regardless of the verbose option being used?
>
> Probably there is some documentation explaining this and other very
> basic aspects of Jikes, but I couldn't find such a thing. In case it
> exists, could you send me a pointer?
>
> Regards
>
> Cristian
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

 « Return to Thread: [rvm-research] Log.write()