@@ -9,12 +9,14 @@ \section{Breakpoint Locations for Managing Parallel Regions and Tasks}
9
9
launching parallel regions or tasks,
10
10
% %%% OMPD provides a routine that the debugger can invoke to
11
11
% %%% determine where to place breakpoints.
12
- the OpenMP runtime must define a number of routines in which
12
+ the OpenMP runtime must define a number of symbols at which
13
13
the debugger may plant breakpoints to receive notification of
14
14
particular events.
15
- The runtime is expected to call these routines when these events occur
16
- \emph {and } data collection for OMPD is
15
+ The runtime is expected to execute through these locations when
16
+ these events occur \emph {and } data collection for OMPD is
17
17
enabled (see~\S \ref {runtime-interface:sec }).
18
+ These locations may, but do not have to, be subroutines
19
+ (see~\S \ref {structural-overview:sec }).
18
20
19
21
\paragraph {Advice to implementors } The debugger needs to be able to detect
20
22
the beginning of OpenMP runtime code.
@@ -72,12 +74,12 @@ \section{Breakpoint Locations for Managing Parallel Regions and Tasks}
72
74
73
75
\subsection {Parallel Regions }
74
76
75
- The OpenMP runtime must call \texttt { ompd \_ bp \_ parallel \_ begin }
76
- when a new parallel region is launched.
77
- The call should occur after a task encounters a parallel construct,
77
+ The OpenMP runtime must execute through
78
+ \texttt { ompd \_ bp \_ parallel \_ begin } when a new parallel region is launched.
79
+ This should occur after a task encounters a parallel construct,
78
80
but before any implicit task starts to execute the parallel
79
81
region's work.
80
- The type signature for \texttt {ompd\_ bp\_ parallel\_ begin } is:
82
+ Conceptually, the type signature for \texttt {ompd\_ bp\_ parallel\_ begin } is:
81
83
\begin {quote }
82
84
\ begin{lstlisting}
83
85
void ompd_bp_parallel_begin ( void );
@@ -103,14 +105,18 @@ \subsection{Parallel Regions}
103
105
will be that of the task encountering the parallel construct.
104
106
The `reenter runtime' address in the information returned by
105
107
\refdef {\texttt {ompd\_ get\_ task\_ frame }}{get-task-frame:def}
106
- will be that of the stack frame where the thread entered the OpenMP
108
+ will be that of the stack frame where the thread called the OpenMP
107
109
runtime to handle the parallel construct.
108
110
The `exit runtime' address will be for the stack frame where the thread
109
111
left the OpenMP runtime to execute the user code that encountered
110
112
the parallel construct.
111
113
112
- When a parallel region finishes, the OpenMP runtime will call
113
- the \texttt {ompd\_ bp\_ parallel\_ end } routine:
114
+ When a parallel region finishes, the OpenMP runtime will cause
115
+ control to flow through
116
+ the location \texttt {ompd\_ bp\_ parallel\_ end }.
117
+ Conceptually, \texttt {ompd\_ bp\_ parallel\_ end } has this type
118
+ signature, but as with other event notification locations
119
+ does not need to be a function:
114
120
\begin {quote }
115
121
\ begin{lstlisting}
116
122
void ompd_bp_parallel_end ( void );
@@ -128,7 +134,7 @@ \subsection{Parallel Regions}
128
134
terminating.
129
135
The `reenter runtime' address in the frame information returned by
130
136
\refdef {\texttt {ompd\_ get\_ task\_ frame }}{get-task-frame:def}
131
- will be that for the stack frame in which the thread entered the
137
+ will be that for the stack frame in which the thread called the
132
138
OpenMP runtime to start the parallel construct just terminating.
133
139
The `exit runtime' address will refer to the stack frame where the
134
140
thread left the OpenMP runtime to execute the user code that
@@ -237,14 +243,17 @@ \subsection{Parallel Regions}
237
243
\subsection {Task Regions }
238
244
239
245
When starting a new task region, the OpenMP runtime system
240
- calls \texttt {ompd\_ bp\_ task\_ begin }:
246
+ must allow control to pass through \texttt {ompd\_ bp\_ task\_ begin }.
247
+ Conceptually, \texttt {ompd\_ bp\_ task\_ end } has this type
248
+ signature, but as with other event notification locations
249
+ does not need to be a function:
241
250
\begin {quote }
242
251
\ begin{lstlisting}
243
252
void ompd_bp_task_begin ( void );
244
253
\end {lstlisting }
245
254
\end {quote }
246
255
\labeldef {bp-task-begin:def}
247
- The OpenMP runtime system will call this routine after the task
256
+ The OpenMP runtime system will execute through this location after the task
248
257
construct is encountered, but before the new explicit task starts.
249
258
When the breakpoint is triggered the debugger can map the operating
250
259
thread to an OpenMP handle using
@@ -256,7 +265,9 @@ \subsection{Task Regions}
256
265
\refdef {\texttt {ompd\_ get\_ task\_ function }}{get-task-function:def}.
257
266
258
267
When a task region completes, the OpenMP runtime system
259
- calls the \texttt {ompd\_ bp\_ task\_ end } function:
268
+ executes through the location \texttt {ompd\_ bp\_ task\_ end }.
269
+ If it is implemented as a subroutine, \texttt {ompd\_ bp\_ task\_ end }
270
+ has this signature:
260
271
\begin {quote }
261
272
\ begin{lstlisting}
262
273
void ompd_bp_task_end ( void );
@@ -269,4 +280,4 @@ \subsection{Task Regions}
269
280
OpenMP thread handle.
270
281
At this point
271
282
\refdef {\texttt {ompd\_ get\_ top\_ task\_ region }}{get-top-task-region:def}
272
- returns the handle for the terminating task.
283
+ returns the handle for the terminating task.
0 commit comments