|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
[rvm-research] Log.write()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 |
|
|
Re: [rvm-research] Log.write()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 |
|
|
Re: [rvm-research] Log.write()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, ------------------------------------------------------------------------------ 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 |
|
|
Re: [rvm-research] Log.write()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, ------------------------------------------------------------------------------ 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 |
|
|
Re: [rvm-research] Log.write()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:
------------------------------------------------------------------------------ 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 |
|
|
Re: [rvm-research] Log.write()Actually within MMTk you should use the Log class.
The Log class safely and coherently buffers output for output. Flushing can be forced (Log.flush()). Log is only supported within MMTk. One day we hope to have it propogated to the rest of the VM. If you're working outside of MMTk, you'll need to use VM.sysWriteln() as Fil mentions. However, to achieve atomicity of output with VM.sysWrite* you'll need to fine a single sysWrite() command that can output the format you want (fine if you just want to output a simple string, but not good if you want to output something complex). If the method you want isn't there, you just need to create your own. Otherwise you won't get atomicity in your output, which is a problem in a multithreaded setting. --Steve On 13/06/2009, at 12:29 AM, Filip 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 ------------------------------------------------------------------------------ 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 |
|
|
Re: [rvm-research] Log.write()There is an implicit flush in Log.writeln(). You can explicitly flush
with Log.flush(). So if you want to use Log.write(), that's fine. Just force flushes as necessary. On 13/06/2009, at 1:35 AM, Cristian Perfumo wrote: > Filip, > > Thanks once again. Your last line was the answer: I was using write > instead of writeln. Now everything works as expected! > > 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 |
| Free embeddable forum powered by Nabble | Forum Help |