@@ -1407,7 +1407,7 @@ ompd_get_task_data(ompd_task_handle_t *task_handle, /* IN: OpenMP task handle*/
14071407 return ret;
14081408}
14091409
1410- #if 0 // the runtime currently does not have task function information
1410+ #if 1 // the runtime currently does not have task function information
14111411ompd_rc_t ompd_get_task_function (
14121412 ompd_task_handle_t *task_handle, /* IN: OpenMP task handle */
14131413 ompd_address_t *task_addr /* OUT: first instruction in the task region */
@@ -1439,17 +1439,15 @@ ompd_rc_t ompd_get_task_function(
14391439 task_addr->segment = OMPD_SEGMENT_UNSPECIFIED;
14401440 TValue taskInfo;
14411441 if (task_handle->lwt .address !=0 )
1442- taskInfo = TValue(context, task_handle->lwt).
1443- cast("ompt_lw_taskteam_t",0); /*lwt*/
1442+ return ompd_rc_bad_input; // We need to decide what we do here.
14441443 else
1445- taskInfo = TValue(context, task_handle->th).
1446- cast("kmp_taskdata_t",0); /*t*/
1447- ret = taskInfo.
1448- access("ompt_task_info"). /*td->ompt_task_info*/
1449- cast("ompt_task_info_t").
1450- access("function"). /*td->ompt_task_info.function*/
1451- castBase().
1452- getValue(task_addr->address);
1444+ ret = TValue (context, task_handle->th ).
1445+ cast (" kmp_taskdata_t" ,0 ). /* t*/
1446+ getArrayElement (1 ). /* see kmp.h: #define KMP_TASKDATA_TO_TASK(taskdata) (kmp_task_t *)(taskdata + 1) */
1447+ cast (" kmp_task_t" ,0 ). /* (kmp_task_t *) */
1448+ access (" routine" ). /* td->ompt_task_info*/
1449+ castBase ().
1450+ getValue (task_addr->address );
14531451 return ret;
14541452}
14551453#endif
0 commit comments