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.
https://github.com/cdwijayarathna/jruby/commit/d8e116d34b64626aee0b45fc42956512b3f116e0 https://github.com/cdwijayarathna/jruby/commit/98750c25d8f73a1ccbbb2e19f43763fb62651a9d https://github.com/cdwijayarathna/jruby/commit/f588f0f4e4e7bf08958f473734d005f8c29fe6d1 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. -Regards -- *Chamila Dilshan Wijayarathna,* SMIEEE, SMIESL, Undergraduate, Department of Computer Science and Engineering, University of Moratuwa.