Re: Clarification on functions in pub_tool_tooliface.h

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on functions in pub_tool_tooliface.h

iraisr
2017-05-08 20:39 GMT+02:00 Siddharth Nilakantan <[hidden email]>:
> Hi Mike and Ivo,
>
> I noticed a thread where you guys had a discussion going.
>
> https://sourceforge.net/p/valgrind/mailman/message/35687503/
>
> I was playing around with writing a tool that does some online analysis of
> register reads/writes. Basically, the tool needs to know every register
> read/write performed by the user program.

Hi Sid,

What is the ultimate goal of your analysis tool?

> Due to minor ambiguity in the  documentation (both in the code and the PLDI paper), I discovered the hard
> way that VG_(track_post_reg_write) and VG_(track_pre_reg_read) are functions
> that are called only around syscalls. I'm guessing that any VG_(track_pre_*)
> and VG_(track_post_*) functions occur only around syscalls.

Yes, indeed.
Every tool also works with the IR (intermediate representation) - this where you
can catch (and instrument) register reads and writes.

I.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on functions in pub_tool_tooliface.h

Siddharth Nilakantan-2
Hi Ivo,

The goal is to get at the 

Thanks,
Sid

On 9 May 2017 at 00:48, Ivo Raisr <[hidden email]> wrote:
2017-05-08 20:39 GMT+02:00 Siddharth Nilakantan <[hidden email]>:
> Hi Mike and Ivo,
>
> I noticed a thread where you guys had a discussion going.
>
> https://sourceforge.net/p/valgrind/mailman/message/35687503/
>
> I was playing around with writing a tool that does some online analysis of
> register reads/writes. Basically, the tool needs to know every register
> read/write performed by the user program.

Hi Sid,

What is the ultimate goal of your analysis tool?
 
I want to discover the critical paths in different phases of a program, the first step of which is to able to build paths.
 
> Due to minor ambiguity in the  documentation (both in the code and the PLDI paper), I discovered the hard
> way that VG_(track_post_reg_write) and VG_(track_pre_reg_read) are functions
> that are called only around syscalls. I'm guessing that any VG_(track_pre_*)
> and VG_(track_post_*) functions occur only around syscalls.

Yes, indeed.
Every tool also works with the IR (intermediate representation) - this where you
can catch (and instrument) register reads and writes.

I.
Yes this is what I had originally started doing. I found it a bit more challenging than expected. Iex_Gets represent register reads. The instrument function sees a lot of IRExpr* for Load data or Put data, which we need to recursively explore to find Iex_Gets... 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on functions in pub_tool_tooliface.h

Siddharth Nilakantan-2
Oops. I started typing my response and then decided to respond inline. Forgot to delete my partial original response. :)

On 9 May 2017 at 12:36, Siddharth Nilakantan <[hidden email]> wrote:
Hi Ivo,

The goal is to get at the 

Thanks,
Sid

On 9 May 2017 at 00:48, Ivo Raisr <[hidden email]> wrote:
2017-05-08 20:39 GMT+02:00 Siddharth Nilakantan <[hidden email]>:
> Hi Mike and Ivo,
>
> I noticed a thread where you guys had a discussion going.
>
> https://sourceforge.net/p/valgrind/mailman/message/35687503/
>
> I was playing around with writing a tool that does some online analysis of
> register reads/writes. Basically, the tool needs to know every register
> read/write performed by the user program.

Hi Sid,

What is the ultimate goal of your analysis tool?
 
I want to discover the critical paths in different phases of a program, the first step of which is to able to build paths.
 
> Due to minor ambiguity in the  documentation (both in the code and the PLDI paper), I discovered the hard
> way that VG_(track_post_reg_write) and VG_(track_pre_reg_read) are functions
> that are called only around syscalls. I'm guessing that any VG_(track_pre_*)
> and VG_(track_post_*) functions occur only around syscalls.

Yes, indeed.
Every tool also works with the IR (intermediate representation) - this where you
can catch (and instrument) register reads and writes.

I.
Yes this is what I had originally started doing. I found it a bit more challenging than expected. Iex_Gets represent register reads. The instrument function sees a lot of IRExpr* for Load data or Put data, which we need to recursively explore to find Iex_Gets... 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users