[mpich-devel] proposed changes to function enter/exit logging

Finkel, Hal J. hfinkel at anl.gov
Thu Nov 7 04:08:45 CST 2019


Clang does support -finstrument-functions (and also provides -finstrument-functions-after-inlining and XRay-based options: https://llvm.org/docs/XRay.html).

 -Hal

On 11/6/19 6:22 PM, Jeff Hammond via devel wrote:
Do you have a list of what compilers support this?  Is this just GCC, just GCC and Clang, or a bigger list?  If Clang supports it, do you know if all of the Clang derivatives (e.g. IBM XLC) support it?

Thanks,

Jeff

On Wed, Nov 6, 2019 at 2:04 PM Raffenetti, Kenneth J. via devel <devel at mpich.org<mailto:devel at mpich.org>> wrote:
Folks,

I want to draw attention to a pull request posted to the MPICH github.

   https://github.com/pmodels/mpich/pull/4139

This proposes to remove all MPIR_FUNC_VERBOSE_ENTER and
MPIR_FUNC_VERBOSE_EXIT macros from MPICH and instead use compiler
function instrumentation when configured for debug logging:
https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html.

There are 2 main benefits:

1. De-clutter the code. PR stats show a net deletion of >10,000 lines!
2. Less error-prone. The compiler will reliably instrument *all*
functions, and will not suffer from copy/paste errors or typos.

Drawbacks:

1. Requires compiler support for instrumentation. May affect users
debugging certain compiler configurations.
2. Compiler function instrumentation logs function addresses, not
symbols. An additional step is needed to convert addresses to function
names via script (included in PR).

What do people think? Will these changes affect anyone using debug
logging in any regular capacity? We're looking for feedback good or bad.
Let us know.

Thanks,
Ken
_______________________________________________
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/devel


--
Jeff Hammond
jeff.science at gmail.com<mailto:jeff.science at gmail.com>
http://jeffhammond.github.io/



_______________________________________________
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/devel


--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/devel/attachments/20191107/2c49aa70/attachment.html>


More information about the devel mailing list