LLVM OpenMP
22.0.0git
runtime
test
ompt
misc
control_tool.c
Go to the documentation of this file.
1
// clang-format off
2
// RUN: %libomp-compile-and-run | FileCheck %s
3
// REQUIRES: ompt
4
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
5
// clang-format on
6
#define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN
7
#include "
callback.h
"
8
#include <omp.h>
9
10
int
main
() {
11
#pragma omp parallel num_threads(1)
12
{
13
print_frame_from_outlined_fn(1);
14
print_frame
(0);
15
omp_control_tool(omp_control_tool_flush, 1, NULL);
16
print_current_address
(0);
17
}
18
19
// clang-format off
20
// Check if libomp supports the callbacks for this test.
21
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_control_tool'
22
23
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
24
25
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: __builtin_frame_address({{.}})=[[EXIT_FRAME:(0x)?[0-f]*]]
26
// CHECK: {{^}}[[MASTER_ID]]: __builtin_frame_address(0)=[[REENTER_FRAME:(0x)?[0-f]*]]
27
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_control_tool: command=3, modifier=1, arg=[[NULL]], codeptr_ra=[[RETURN_ADDRESS:(0x)?[0-f]*]], current_task_frame.exit=[[EXIT_FRAME]], current_task_frame.reenter={{(0x)?[0-f]*}}
28
// CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]
29
// clang-format on
30
31
return
0;
32
}
callback.h
print_frame
#define print_frame(level)
Definition
callback.h:210
print_current_address
#define print_current_address(id)
Definition
callback.h:255
main
int main()
Definition
control_tool.c:10
Generated on
for LLVM OpenMP by
1.14.0