Re: [rvm-research] Instrumenting machine codes to find memory addresses

Michael Bond <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
Hi Shashank,

It's hard to say without seeing exactly how you instrumented "new." It 
seems tricky (or at least different from instrumenting other accesses) 
since the instrumentation presumably occurs after the allocation, 
whereas read/write instrumentation occurs before the access if you're 
following Pacer's approach. To instrument after an allocation, it seems 
like you'd want the instrumentation to push the address (which is on the 
stack) onto the stack *again* so it's both the top and next element on 
the stack, and then call your instrumentation method. For better 
feedback, please show the code for exactly how you instrumented "new." :)

Cheers,
Mike

On 04/28/2013 02:14 PM, Shashank Gupta wrote:
> Hi,
>
> We are inserting some machine codes in the machine code array of a 
> sample Java program running on Jikes RVM dynamically. We want to find 
> the memory addresses accessed, and hence inserted our own instructions 
> to calls a function within Jikes passing address as an argument. We 
> are using an approach almost similar as done in Pacer Patch in Jikes 
> Archive.
>
> It was working for simple programs without constructors of a separate 
> class being called. However in case of using "new" operator for 
> creating instance of a class, we are either getting sysFail error or a 
> Null Pointer Exception.
>
> What might be possible reasons for this?
>
> Thanks
>
> -- 
> Shashank Gupta
> 4th Year, B.Tech
> Department of Computer Science and Engineering
> Indian Institute of Technology Delhi
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
>
>
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1

_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.