[jruby-dev] DTrace Support for JRuby
(too old to reply)
Chamila Wijayarathna
2013-09-27 17:56:26 UTC
Hello all,
I am continuing working on my GSOC project "DTrace Support for JRuby" to
finish it.
Recently I was working on adding stringCreate, arrayCreate, hashCreate and
symbolCreate probes and did following commits to my local repository with
few unsolved problems.


But in those probes I came up with few problems.

I am taking line number of the code which is corresponding to the evennt
which fire probe by creating a BackTrace using
ThreadContext.getTraceSubset(), but in some cases it returns an empty
stack. For example when creating a string by
s = "Hello World",
trace corresponding to that is empty. You can find my logic for creating
trace in commits. Please help me to find if I am doing anything wrong here.

Also I am tracking hashCreate at RubyHash constructor. I added probes at 6
constructors which seems like covering all probes. But even after code
exiting constructor, hash size remain 0, even for hashes created using
grades1 = { "Bob" => 82,"Jim" => 94,"Billy" => 58}
which should obviously have size > 0. Is it get created with hash size = 0,
if not how can I get the correct hash size? Should I look for another place
for add hashCreate?

I also added symbolCreate on RubySymbol constructor. Details can be found
at my diff at https://gist.github.com/cdwijayarathna/6732232. But it
doesn't seem that all symbol creations go through there. Where else should
I add symbolCreate probe to catch all events?

Any help for any of these problems will be very helpful.

*Chamila Dilshan Wijayarathna,*
Department of Computer Science and Engineering,
University of Moratuwa.