Page MenuHomePhabricator

Fix OMPT_TRACE/OMPT_BLAME definition inheritance (was: Missing include kmp_config.h)
ClosedPublic

Authored by harald.servat on Nov 11 2015, 2:50 AM.

Details

Summary

Include missing kmp_config.h in the ompt-general.c file. If the file is not included, the inclusion of ompt-event-specific.h (through ompt-internal.h) does not inherit neither OMPT_TRACE nor OMPT_BLAME.

UPDATE: I have updated the title to what seems to be more appropriate according to John's comments.

Diff Detail

Repository
rL LLVM

Event Timeline

harald.servat retitled this revision from to Missing include kmp_config.h.
harald.servat updated this object.

My aim is to keep ompt-general.c completely of details specific to a particular runtime, so its code can be reused in other runtimes. For that reason, I don't support adding an include of kmp_config.h to ompt-general.c.

I understand the problem that you are trying to address: that ompt-event-specific.h included through ompt-internal.h in ompt-general.c does not inherit see definitions for OMPT_TRACE nor OMPT_BLAME.

The right way to fix this is to drop the include of ompt-internal.h in ompt-general.c. It gets there anyway through ompt-specific.c.

ompt-specific.c includes kmp.h (which includes kmp_config.h) before including ompt-internal.h.

Please update your diff to drop the include of both ompt-internal.h and kmp_config.h in ompt-general.c.

Also, when you prepare diffs, make sure to use "git diff -U999999" so the full context of the diff is available. That's the way that they want patches prepared using differential.

Thank you for the pointers John! I've updated the patch according to your comments.

harald.servat retitled this revision from Missing include kmp_config.h to Fix OMPT_TRACE/OMPT_BLAME definition inheritance (was: Missing include kmp_config.h).Nov 11 2015, 7:09 AM
harald.servat updated this object.

Looks good to me.

This revision was automatically updated to reflect the committed changes.