[PATCH] added enter-leave pass to instrument entering and leaving functions
Diego Novillo via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 5 07:11:35 PST 2015
I've got a few high-level questions before I get into the patch itself.
- What's the goal of this pass? Tracing? Handwritten profiling of whole
functions?
- What semantics do you want to have wrt languages that use mangling to
separate member functions, overloading, namespaces, etc?
- The pass seems to do nothing else but insert these calls, wouldn't it
make more sense to do this as a clang tool? It would give you more
expressive power for the user to specify where they want to insert the
enter/leave functions.
- Should all exit points be instrumented? What happens in the case of
exceptions or noreturn points in the function flow?
Diego.
On Wed, Nov 4, 2015 at 3:05 PM, Bob Haarman <robbert at fb.com> wrote:
> Allows instrumentation of functions by specifying functions to be called
> when the instrumented function is entered or returned from. The desired
> instrumentation is specified by a map file which names all functions to be
> instrumented. For each such function, it specifies the function to be
> called on entry, the function to be called before returning, or both. The
> called functions receive the name of the instrumented function as their
> first parameter.
>
> CC'ing dnovillo as my best guess as to who may be a good reviewer for this
> code.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151105/591816f0/attachment.html>
More information about the llvm-commits
mailing list