Am 01.10.2012 23:47, schrieb Wonjoon Song:
> In the example lackey, there is
>
> static VG_REGPARM(2) void trace_load(Addr addr, SizeT size);
>
> I saw a pdf http://valgrind.org/docs/iiswc2006.pdf that VG_REGPARM
 > passes arguments using registers instead of stack. Is this inlining?

No.

VG_REGPARM(x) changes the used calling convention for a given
function such that more registers are used for parameters.

It is a convention in Valgrind that functions called from
generated code have to obey a calling convention using VG_REGPARM(x)
if x parameters are to be passed. This will speed up such calls
on platforms where the default calling convention uses the stack
to pass parameters (most important x86/32bit).

As trace_load() is to be called from generated code, it has to
use this calling convention.

> If it is not, what can i do to inline functions?
 > because it says I can improve speed using inlining.

"Inlining" means embedding of instructions of a function into
a caller site. As the caller here always is generated code,
"inlining" here means to embed code generated at static time
into the dynamically generated code at runtime.

This could be done, but Valgrind currently does not support it
(Intels PIN tool does).

Instead, if you care about such optimizations, the current solution
is to directly generate VEX code in your instrumentation function, 
instead of calling a precompiled function.

Josef



>
> Thank you,
> Wonjoon
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Valgrind-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to