This is an archive of the discontinued LLVM Phabricator instance.

Enable debugger support
ClosedPublic

Authored by jlpeyton on May 26 2015, 1:32 PM.

Details

Summary

These changes enable external debuggers to conveniently interface with the LLVM OpenMP Library. Structures are added which describe the important internal structures of the OpenMP Library e.g., teams, threads, etc. This feature is turned on by default (LIBOMP_USE_DEBUGGER) and can be turned off with -DLIBOMP_USE_DEBUGGER=off.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton updated this revision to Diff 26531.May 26 2015, 1:32 PM
jlpeyton retitled this revision from to Enable debugger support.
jlpeyton updated this object.
jlpeyton edited the test plan for this revision. (Show Details)
jlpeyton added a reviewer: hfinkel.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added subscribers: Unknown Object (MLST), Unknown Object (MLST), omalyshe.
hfinkel edited edge metadata.May 27 2015, 10:48 AM
runtime/src/kmp_debugger.h
24 ↗(On Diff #26531)

Please document how, by whom, and when this can be set.

26 ↗(On Diff #26531)

How is the ident parameter used? (please document that)

jlpeyton updated this revision to Diff 27528.Jun 11 2015, 11:03 AM
jlpeyton edited edge metadata.

On May 28th, 2015, Olga Malysheva wrote:

Hello!

Thank you for your comment. We'll add more comments for this code.

  1. __kmp_debugging can be set by a debugger to notify OpenMP RTL that it is run under the debugger.
  1. The ident parameter is used in __kmp_omp_num_threads() function to check if the number of threads was changed by the debugger for the parallel which location was specified by the ident.

Please, see usage of kmp_omp_num_threads() (together with kmp_debugging) in __kmp_fork_call() function.

Currently, Intel Debugger (IDB) is supported.

Regards,
Olga

Addressing Hal's requests with new patch.

Please document how, by whom, and when this can be set.
How is the ident parameter used? (please document that)

hfinkel accepted this revision.Jun 22 2015, 5:44 PM
hfinkel edited edge metadata.

LGTM, thanks!

This revision is now accepted and ready to land.Jun 22 2015, 5:44 PM
This revision was automatically updated to reflect the committed changes.

While I don't object to this commit, I'll note that what we hope will be a standard for an OpenMP debugging interface known as OMPD is under active development. The current draft is posted here: https://github.com/OpenMPToolsInterface/OMPD-Technical-Report

A group at LLNL and Totalview is working to refine the spec. LLNL has developed patches to another version of the Intel runtime to support an OMPD prototype.