[mpich-devel] proposed changes to function enter/exit logging
Raffenetti, Kenneth J.
raffenet at mcs.anl.gov
Wed Aug 4 10:01:28 CDT 2021
Hi all,
I am digging up this old thread to call attention to another PR that proposes changes to the function enter and exit macros.
https://github.com/pmodels/mpich/pull/5479
The changes in this new PR are less radical than #4276. It would keep enter/exit macros in the code, but simplify their use. This would help prevent common errors/bugs associate with them. Please let us know if you have thoughts! We would like to merge these for the upcoming 4.0 series.
Thanks,
Ken
On 1/16/20, 10:15 AM, "Raffenetti, Kenneth J." <raffenet at mcs.anl.gov> wrote:
[UPDATE]
An alternative approach to the function enter/exit logging changes has
been posted here:
https://github.com/pmodels/mpich/pull/4276
The previous -finstrument-functions PR only supported Linux for
address->func_name conversion in log files, which was problematic for
some. The new approach uses scripts to add/remove the enter/exit macros
on-demand. The benefit is that it will work on all systems, and be less
error-prone than manually adding the macros by hand. Please comment on
the PR or this thread if you have thoughts.
Thanks,
Ken
On 11/7/19 9:35 AM, Raffenetti, Kenneth J. via devel wrote:
> I should also note that currently the address->function translation
> scripts will only work on Linux.
>
> Ken
>
> On 11/7/19 8:30 AM, Ken Raffenetti wrote:
>> Here's what I've found so far:
>>
>> XL compilers support -qfunctrace with slightly different user-supplied
>> tracing function signatures. Should be trivial to add support to MPICH.
>>
>> https://www.ibm.com/support/knowledgecenter/SSGH2K_12.1.0/com.ibm.xlc121.aix.doc/compiler_ref/opt_functrace.html
>>
>>
>> PGI supports -Minstrument with the same tracing function signatures as
>> GCC and Clang.
>>
>> Intel supports -finstrument-functions.
>>
>> I do not see any support in Oracle suncc.
>>
>> Ken
>>
>> On 11/7/19 4:08 AM, Finkel, Hal J. via devel wrote:
>>> 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
>>>
>>>
>>> _______________________________________________
>>> To manage subscription options or unsubscribe:
>>> https://lists.mpich.org/mailman/listinfo/devel
>>>
> _______________________________________________
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/devel
>
More information about the devel
mailing list