[llvm-dev] Obtain the execution time of one specified library function, such as CUDA library function.

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 7 08:36:07 PDT 2017


Sounds like this:
https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation
might
be relevant to your interests. Though I'm not sure there's a supported way
to /only/ collect a profile for a single function.

On Thu, Jul 6, 2017 at 8:20 PM 李阳 via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> Hi LLVM-ers,
>
> I want to obtain the execution time of one specified library function,
> such as CUDA library function.
>
> My thoughts is: 1) use clang to compile the library function to IR;
>                          2) instrument the IR, here is my unknown. I have
> no idea about how to instrument the instruction relative to execution time.
> Or is this approach feasible? If there is function supporting timestamp, I
> want to insert the start-time timestamp to the begin of the library
> function, and insert the stop-time timestamp to the end of the library
> function, then compute the interval between two timestamp.
>
> Thanks!
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170707/9484a0a0/attachment.html>


More information about the llvm-dev mailing list