Skip to content

Commit 3334de9

Browse files
committed
added dyninst12 support
1 parent daad17e commit 3334de9

File tree

11 files changed

+90
-19
lines changed

11 files changed

+90
-19
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2022-09-16 Gregory L. Lee <[email protected]>
2+
* : Add support for dyninst 12+ (remove local variable gathering). This
3+
means python frames cannot be gathered.
4+
15
2022-08-22 Gregory L. Lee <[email protected]>
26
* : updated version string to 4.2.0
37

INSTALL

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ Installation
7777

7878
When building STAT itself, first run configure. You will need
7979
to use the --with-package options to specify the install prefix
80-
for mrnet, graphlib, launchmon, libdwarf, and stackwalker.
81-
These options will add the necessary include and library search
82-
paths to the compile options. Refer to configure --help for
83-
exact options. You may also wish to specify the maximum number
84-
of communication processes to launch per node with the option
80+
for mrnet, graphlib, launchmon, libdwarf, and dyninst. These
81+
options will add the necessary include and library search paths
82+
to the compile options. Refer to configure --help for exact
83+
options. You may also wish to specify the maximum number of
84+
communication processes to launch per node with the option
8585
--with-procspernode=number, generally set to the number of
8686
cores per node.
8787

config/x_ac_debuglibs.m4

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,34 @@ AC_DEFUN([X_AC_DEBUGLIBS], [
114114
fi
115115
AC_MSG_RESULT([$dyninst_vers_10])
116116
117+
AC_MSG_CHECKING([Checking Dyninst Version 12.0 or greater])
118+
dyninst_vers_12=no
119+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include "dyninstversion.h"
120+
int main()
121+
{
122+
return 0;
123+
}])],
124+
[dyninst_vers_12=yes],
125+
[]
126+
)
127+
128+
if test "$dyninst_vers_12" = yes; then
129+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include "dyninstversion.h"
130+
#if DYNINST_MAJOR_VERSION < 12
131+
#error
132+
#endif
133+
int main()
134+
{
135+
return 0;
136+
}])],
137+
[CXXFLAGS="$CXXFLAGS -std=c++11"],
138+
[dyninst_vers_12=no]
139+
)
140+
fi
141+
AC_MSG_RESULT([$dyninst_vers_12])
142+
143+
144+
117145
AC_CHECK_HEADER(Symtab.h,
118146
[],
119147
[AC_MSG_ERROR([Symtab.h is required. Specify prefix with --with-stackwalker])],

doc/quickstart/stat_quickstart.pdf

0 Bytes
Binary file not shown.

doc/src/stat_example.sgml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,33 @@ The most typical usage is to invoke STAT on the job launcher's PID:
55
<screen>
66
% srun mpi_application arg1 arg2 &
77
[1] 16842
8-
8+
99
% ps
1010
PID TTY TIME CMD
1111
16755 pts/0 00:00:00 bash
1212
16842 pts/0 00:00:00 srun
1313
16871 pts/0 00:00:00 ps
14-
14+
1515
% stat-cl 16842
1616
</screen>
1717
</informalexample>
1818
<para>
19+
Or for Flux, there is an additional step required:
20+
</para>
21+
<informalexample>
22+
<screen>
23+
% flux mini run -n 8 mpi_application &
24+
[1] 216842
25+
26+
% flux jobs -A
27+
JOBID USER NAME ST NTASKS NNODES RUNTIME NODELIST
28+
fdB2peU7 lee218 a.out R 8 2 12.89s fluke[6-7]
29+
% flux job attach --debug fdB2peU7&
30+
[3] 216853
31+
% stat-cl 216853
32+
</screen>
33+
</informalexample>
34+
<para>
1935
You can also launch your application under STAT's control with the <option>-C</option> option. All arguments after <option>-C</option> are used for job launch:
2036
</para>
2137
<informalexample>

doc/src/stat_installation.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ STAT and its dependencies can also be built via the Spack package management too
55
For STAT 4.0.1 and beyond, the spack build of STAT requires Python 3 and will require the activation of the py-xdot package <command>./bin/spack activate py-xdot</command>. For versions up to and including STAT 4.0.0, the spack build of STAT requires Python 2 and requires the activation of the py-pygtk and py-enum34 packages <command>./bin/spack activate py-pygtk</command> and <command>./bin/spack activate py-enum34</command>.
66
</para>
77
<para>
8-
When building STAT itself, first run <command>configure</command>. You will need to use the <option>--with-package</option> options to specify the install prefix for mrnet, graphlib, launchmon, libdwarf, and stackwalker. These options will add the necessary include and library search paths to the compile options. Refer to <command>configure --help</command> for exact options. You may also wish to specify the maximum number of communication processes to launch per node with the option <option>--with-procspernode=number</option>, generally set to the number of cores per node.
8+
When building STAT itself, first run <command>configure</command>. You will need to use the <option>--with-package</option> options to specify the install prefix for mrnet, graphlib, launchmon, libdwarf, and dyninst. These options will add the necessary include and library search paths to the compile options. Refer to <command>configure --help</command> for exact options. You may also wish to specify the maximum number of communication processes to launch per node with the option <option>--with-procspernode=number</option>, generally set to the number of cores per node.
99
</para>
1010
<para>
1111
STAT creates wrapper scripts for the <command>stat-cl</command> and <command>stat-gui</command> commands. These wrappers set appropriate paths for the launchmon and mrnet_commnode executables, based on the <option>--with-launchmon</option> and <option>--with-mrnet</option> configure options, thus it is important to specify both of these even if they share a prefix.

doc/src/stat_man.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
</refnamediv>
2626
<refsynopsisdiv>
2727
<cmdsynopsis>
28-
<command>stat-cl</command> <arg><replaceable class="option">OPTIONS</replaceable></arg> <arg choice="plain"><replaceable class="parameter">PID</replaceable></arg>
28+
<command>stat-cl</command> <arg><replaceable class="option">OPTIONS</replaceable></arg> <arg choice="plain"><replaceable class="parameter">PID</replaceable></arg>
2929
</cmdsynopsis>
3030
<cmdsynopsis>
31-
<command>stat-cl</command> <arg><replaceable class="option">OPTIONS</replaceable></arg><arg choice="plain">-C</arg> <arg choice="plain" rep="repeat"><replaceable class="parameter">COMMAND</replaceable></arg>
31+
<command>stat-cl</command> <arg><replaceable class="option">OPTIONS</replaceable></arg><arg choice="plain">-C</arg> <arg choice="plain" rep="repeat"><replaceable class="parameter">COMMAND</replaceable></arg>
3232
</cmdsynopsis>
3333
<para>
3434
where
3535
<synopsis>
3636
<cmdsynopsis><arg><replaceable class="option">OPTIONS</replaceable></arg></cmdsynopsis>
3737
represents zero or more stat-cl options.
38-
<cmdsynopsis><arg choice="plain"><replaceable class="parameter">PID</replaceable></arg></cmdsynopsis>
38+
<cmdsynopsis><arg choice="plain"><replaceable class="parameter">PID</replaceable></arg></cmdsynopsis>
3939
is the PID of the parallel job launcher for the target application to attach to.
40-
<cmdsynopsis><arg choice="plain" rep="repeat"><replaceable class="parameter">COMMAND</replaceable></arg></cmdsynopsis>
40+
<cmdsynopsis><arg choice="plain" rep="repeat"><replaceable class="parameter">COMMAND</replaceable></arg></cmdsynopsis>
4141
is the command to launch the application.
4242
</synopsis>
4343
</para>

doc/userguide/stat_userguide.pdf

971 Bytes
Binary file not shown.

man/STAT.1

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ where
1919

2020
.sp
2121
\fB\fIPID\fB\fR
22-
22+
2323
is the PID of the parallel job launcher for the target application to attach to.
2424

2525
.sp
2626
\fB\fICOMMAND\fB\fR\fI...\fR
27-
27+
2828
is the command to launch the application.
2929

3030
.sp
@@ -152,15 +152,32 @@ The most typical usage is to invoke STAT on the job launcher's PID:
152152
.nf
153153
% srun mpi_application arg1 arg2 &
154154
[1] 16842
155-
155+
156156
% ps
157157
PID TTY TIME CMD
158158
16755 pts/0 00:00:00 bash
159159
16842 pts/0 00:00:00 srun
160160
16871 pts/0 00:00:00 ps
161-
161+
162162
% stat-cl 16842
163163

164+
.sp
165+
.fi
166+
.PP
167+
Or for Flux, there is an additional step required:
168+
.PP
169+
.sp
170+
.nf
171+
% flux mini run -n 8 mpi_application &
172+
[1] 216842
173+
174+
% flux jobs -A
175+
JOBID USER NAME ST NTASKS NNODES RUNTIME NODELIST
176+
fdB2peU7 lee218 a.out R 8 2 12.89s fluke[6-7]
177+
% flux job attach --debug fdB2peU7&
178+
[3] 216853
179+
% stat-cl 216853
180+
164181
.sp
165182
.fi
166183
.PP

src/STAT_BackEnd.C

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,6 +1889,7 @@ StatError_t STAT_BackEnd::getVariable(const Frame &frame, char *variableName, ch
18891889
vector<localVar *> vars;
18901890
vector<localVar *>::iterator varsIter;
18911891

1892+
#if DYNINST_MAJOR_VERSION<12
18921893
frame.getName(frameName);
18931894
printMsg(STAT_LOG_MESSAGE, __FILE__, __LINE__, "Searching for variable %s in frame %s\n", variableName, frameName.c_str());
18941895

@@ -1937,8 +1938,10 @@ StatError_t STAT_BackEnd::getVariable(const Frame &frame, char *variableName, ch
19371938
}
19381939
}
19391940
}
1940-
19411941
printMsg(STAT_LOG_MESSAGE, __FILE__, __LINE__, "Found variable %s in frame %s\n", variableName, frameName.c_str());
1942+
#else //#if DYNINST_MAJOR_VERSION<12
1943+
printMsg(STAT_LOG_MESSAGE, __FILE__, __LINE__, "local variable support not availabile with dyninst 12 and greater\n");
1944+
#endif
19421945
return STAT_OK;
19431946
}
19441947

0 commit comments

Comments
 (0)