From: Filip P. <pi...@pu...> - 2010-03-28 22:26:28
|
Here's an easy solution: insert a call to a tracing function. Just write a static Java method that does what you want (i.e. print stuff, appends to a buffer, whatever). You may even have multiple such methods depending on what you want to put into the trace. Then insert a call to that function. There is no way to do this without significantly perturbing performance unless you are just tracing some very-rarely-used code. Thus, you should just make this work in the baseline compiler, which should be straight forward. -Filip On 3/28/2010 6:15 PM, Kelvin Tian wrote: > Hi, > > Sorry to bother again, but I want to collect some traces using > JikesRVM. The traces are basically some strings generated while > programs are running. One way to do that is to instrument client > programs in a way that they put the strings in a global buffer, but > this is error prone and requires much effort to insert the correct > assembly code. The other way I want to try is that if I can create an > string appending instruction (similar to instrumented counter, but > operands are string, and operator is string append) which can append > the trace strings whenever a trace is needed to collect. I didn't find > a way to create such an instruction, as there seems no such operators. > A third way is that I can use yielding points, but unfortunately they > are only executed periodically and I need to collect accurate traces. > I suppose collecting traces is common in profiling, so I want to > hear some suggestions for similar experiences. Are there any way > commonly used to collect traces efficiently? Thanks a lot for any > suggestions! > > > -- > Best regards, > Kelvin > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > Jikesrvm-researchers mailing list > Jik...@li... > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers > |