11/*
2- * ompd_intel .cpp
2+ * omp-debug .cpp
33 *
44 * Created on: Jan 14, 2015
55 * Author: Ignacio Laguna
1313
1414#define NDEBUG 1
1515
16- #include " ompd_intel .h"
16+ #include " omp-debug .h"
1717#include " ompd.h"
1818// #include <stdio.h>
1919#include < cstdio>
@@ -122,6 +122,7 @@ ompd_rc_t ompd_release_address_space_handle (
122122 return ompd_rc_ok;
123123}
124124
125+ #if 0 // no device support yet
125126ompd_rc_t ompd_device_initialize (
126127 ompd_address_space_context_t *context, /* IN: */
127128 ompd_device_identifier_t id, /* IN: object defined by native device API */
@@ -178,6 +179,7 @@ ompd_rc_t ompd_device_initialize (
178179 /* TODO(mjm) - Find appropriate error return result for not finding a match */
179180 return ompd_rc_ok;
180181}
182+ #endif // no device support
181183
182184/* --- 4 Handle Management -------------------------------------------------- */
183185
@@ -637,6 +639,7 @@ ompd_rc_t ompd_parallel_handle_compare (
637639 return ompd_rc_ok;
638640}
639641
642+ #if 0 // parallel-id is initialized to zero
640643ompd_rc_t ompd_get_parallel_handle_string_id (
641644 ompd_parallel_handle_t *parallel_handle,
642645 char **string_id
@@ -653,6 +656,7 @@ ompd_rc_t ompd_get_parallel_handle_string_id (
653656 sprintf(*string_id, "0x%llx", (long long)id);
654657 return ompd_rc_ok;
655658}
659+ #endif
656660
657661
658662/* --- 4.3 Task Handles ----------------------------------------------------- */
@@ -935,6 +939,7 @@ ompd_rc_t ompd_task_handle_compare (
935939 return ompd_rc_ok;
936940}
937941
942+ #if 0 // all task ids are initialized to zero
938943ompd_rc_t ompd_get_task_handle_string_id (
939944 ompd_task_handle_t *task_handle,
940945 char **string_id
@@ -950,6 +955,7 @@ ompd_rc_t ompd_get_task_handle_string_id (
950955 sprintf(*string_id, "0x%llx", (long long)id);
951956 return ompd_rc_ok;
952957}
958+ #endif
953959
954960
955961/* --- 5 Process and Thread Settings ---------------------------------------- */
@@ -1088,9 +1094,9 @@ ompd_rc_t ompd_get_active_level(
10881094
10891095/* --- 6.2 OMPT Parallel Region Inquiry Analogues ------------------------- */
10901096
1091- ompd_rc_t ompd_get_parallel_id (
1097+ ompd_rc_t ompd_get_parallel_data (
10921098 ompd_parallel_handle_t *parallel_handle, /* IN: OpenMP parallel handle */
1093- ompd_parallel_id_t *id /* OUT: OpenMP parallel id */
1099+ ompd_address_t *data /* OUT: OpenMP parallel id */
10941100 )
10951101{
10961102 if (!parallel_handle)
@@ -1115,12 +1121,12 @@ ompd_rc_t ompd_get_parallel_id(
11151121 ompd_rc_t ret = teamInfo.
11161122 access (" ompt_team_info" ). /* t.ompt_team_info*/
11171123 cast (" ompt_team_info_t" ,0 ).
1118- access (" parallel_id" ). /* t.ompt_team_info.parallel_id*/
1119- castBase (" ompt_parallel_id_t" ). /* type: ompt_parallel_id_t*/
1120- getValue (*id);
1124+ access (" parallel_data" ). /* t.ompt_team_info.parallel_id*/
1125+ getAddress (data);
11211126 return ret;
11221127}
11231128
1129+ #if 0 // there is no such thing as a parallel function
11241130ompd_rc_t ompd_get_parallel_function(
11251131 ompd_parallel_handle_t *parallel_handle, /* IN: OpenMP parallel handle */
11261132 ompd_address_t *parallel_addr /* OUT: first instruction in the parallel region */
@@ -1154,6 +1160,7 @@ ompd_rc_t ompd_get_parallel_function(
11541160 getValue(parallel_addr->address);
11551161 return ret;
11561162}
1163+ #endif // no parallel function
11571164
11581165/* --- 7 Thread Inquiry ----------------------------------------------------- */
11591166
@@ -1637,7 +1644,7 @@ ompd_rc_t ompd_get_task_frame(
16371644 cast (" ompt_frame_t" , 0 );
16381645 sp_reentry->segment = OMPD_SEGMENT_UNSPECIFIED;
16391646 ompd_rc_t ret = frame.
1640- access (" reenter_runtime_frame " ). // td->ompt_task_info.frame.reenter_runtime_frame
1647+ access (" enter_frame " ). // td->ompt_task_info.frame.enter_frame
16411648 castBase ().
16421649 getValue (sp_reentry->address );
16431650
@@ -1646,16 +1653,16 @@ ompd_rc_t ompd_get_task_frame(
16461653
16471654 sp_exit->segment = OMPD_SEGMENT_UNSPECIFIED;
16481655 ret = frame.
1649- access (" exit_runtime_frame " ). // td->ompt_task_info.frame.exit_runtime_frame
1656+ access (" exit_frame " ). // td->ompt_task_info.frame.exit_frame
16501657 castBase ().
16511658 getValue (sp_exit->address );
16521659
16531660 return ret;
16541661}
16551662
1656- ompd_rc_t ompd_get_task_id (
1663+ ompd_rc_t ompd_get_task_data (
16571664 ompd_task_handle_t *task_handle, /* IN: OpenMP task handle*/
1658- ompd_task_id_t *task_id /* OUT: OpenMP task ID */
1665+ ompd_address_t *task_data /* OUT: OpenMP task ID */
16591666 )
16601667{
16611668 if (!task_handle)
@@ -1680,13 +1687,13 @@ ompd_rc_t ompd_get_task_id(
16801687 ompd_rc_t ret = taskInfo.
16811688 access (" ompt_task_info" ). // td->ompt_task_info
16821689 cast (" ompt_task_info_t" ).
1683- access (" task_id" ). // td->ompt_task_info.task_id
1684- castBase (" ompt_task_id_t" ).
1685- getValue (*task_id);
1690+ access (" task_data" ). // td->ompt_task_info.task_data
1691+ getAddress (task_data);
16861692
16871693 return ret;
16881694}
16891695
1696+ #if 0 // the runtime currently does not have task function information
16901697ompd_rc_t ompd_get_task_function(
16911698 ompd_task_handle_t *task_handle, /* IN: OpenMP task handle */
16921699 ompd_address_t *task_addr /* OUT: first instruction in the task region */
@@ -1731,7 +1738,7 @@ ompd_rc_t ompd_get_task_function(
17311738 getValue(task_addr->address);
17321739 return ret;
17331740}
1734-
1741+ # endif
17351742
17361743/* --- 9 OMPD Version and Compatibility Information ------------------------- */
17371744
@@ -1747,9 +1754,10 @@ ompd_rc_t ompd_get_version_string(
17471754 const char **string /* OUT: OMPD version string */
17481755 )
17491756{
1750- static char version_string[256 ]={0 };
1757+ /* static char version_string[256]={0};
17511758 if(version_string[0]=='\0')
1752- sprintf (version_string, " Intel OpenMP %i.%i Debugging Library implemnting TR %i%c" ,OMPD_IMPLEMENTS_OPENMP, OMPD_IMPLEMENTS_OPENMP_SUBVERSION, OMPD_TR_VERSION, OMPD_TR_SUBVERSION);
1759+ sprintf(version_string, "LLVM OpenMP %i.%i Debugging Library implemnting TR %i%c",OMPD_IMPLEMENTS_OPENMP, OMPD_IMPLEMENTS_OPENMP_SUBVERSION, OMPD_TR_VERSION, OMPD_TR_SUBVERSION);*/
1760+ static const char version_string[] = " LLVM OpenMP " STR (OMPD_IMPLEMENTS_OPENMP) " ." STR (OMPD_IMPLEMENTS_OPENMP_SUBVERSION) " Debugging Library implemnting TR " STR (OMPD_TR_VERSION) " " STR (OMPD_TR_SUBVERSION) ;
17531761 *string = version_string;
17541762 return ompd_rc_ok;
17551763}
0 commit comments