RE: On strategies for function call instrumentation

2009-11-24 Thread Grigori Fursin
Hi Derrick, As Yuri pointed out we needed some similar instrumentation for our function cloning work. It may not be exactly what you need but could be useful. By the way, it seems that you are interested to use GCC as a research platform. In this case, sorry for a small advertisement, but I wou

Re: On strategies for function call instrumentation

2009-11-24 Thread Yuri Kashnikoff
Hi! I totally agree with Basille. Actually pretty similar thing was implemented by Liang Peng (ICT) as GCC GSoC'09 project - http://ctuning.org/wiki/index.php/CTools:ICI:Projects:GSOC09:Function_cloning_and_program_instrumentation So, probably you should take a look at the code in the instrument

Re: On strategies for function call instrumentation

2009-11-24 Thread Basile STARYNKEVITCH
Mark Mitchell wrote: Derrick Coetzee wrote: 1. We have a C/C++ source-to-source translation framework. We could translate each function call "f(a,b,c)" to something like "({ _asm { ... }; typeof(f(a,b,c)) result = f(a,b,c); _asm { ... }; result; })" 2. We could modify the code generation of gcc

Re: On strategies for function call instrumentation

2009-11-24 Thread Mark Mitchell
Derrick Coetzee wrote: > 1. We have a C/C++ source-to-source translation framework. We could > translate each function call "f(a,b,c)" to something like "({ _asm { > ... }; typeof(f(a,b,c)) result = f(a,b,c); _asm { ... }; result; })" > 2. We could modify the code generation of gcc in a private fo