Skip to content

Commit 3d3bf76

Browse files
Finish up course slides
1 parent 0a93291 commit 3d3bf76

File tree

1 file changed

+32
-9
lines changed

1 file changed

+32
-9
lines changed

courses/misc_tools/200_gnatstack.rst

+32-9
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Two parts of performing stack analysis
132132

133133
:command:`gprbuild --RTS=light main_unit.adb -cargs -fcallgraph-info=su`
134134

135-
*We use the light runtime to avoid issues with things like the secondary stack*
135+
*We use the light runtime to avoid including things like the secondary stack*
136136

137137
2. Analysis and report generation
138138

@@ -153,21 +153,44 @@ Which generates the following report:
153153
+-> main_unit
154154
+-> main_unit.inverse
155155

156+
*Note that the actual stack usage can depend on things like runtime, operating system, and compiler version.*
157+
156158
================================
157159
:toolname:`GNATstack` Switches
158160
================================
159161

160-
----------------------------------
161-
Controlling Behavior When Called
162-
----------------------------------
162+
----------------------------
163+
Execution-Related Switches
164+
----------------------------
163165

164-
* TBD
166+
:command:`-e main1[,main2[,...]` |rightarrow| Use list of subprograms as entry points
165167

166-
---------------------------
167-
TBD
168-
---------------------------
168+
:command:`-a` |rightarrow| Use all subprograms as entry points
169169

170-
* TBD
170+
:command:`-f filename` |rightarrow| Store callgraph in :filename:`filename`
171+
172+
* If not specified, stored in :filename:`graph.vcg`
173+
174+
:command:`-P project` |rightarrow| Use GPR file :filename:`project` to find :filename:`*.ci` files
175+
176+
------------------------
177+
Commonly Used Switches
178+
------------------------
179+
180+
:command:`-v` |rightarrow| verbose
181+
182+
* Show source location for subprogam
183+
184+
:command:`-o=\{a,s\}` |rightarrow| order for displaying call graphs
185+
186+
* **a** sort alphabetically
187+
* **s** sort by stack usage (default)
188+
189+
:command:`-t=\{i,d,a\}` - print target for indirect/dispatching calls
190+
191+
* **i** for indirect calls only
192+
* **d** for dispatching calls only
193+
* **a** for both indirect and dispatching calls
171194

172195
=====
173196
Lab

0 commit comments

Comments
 (0)