Files
TheRock/rocm-systems/projects/rocprofiler-systems/external/dyninst/stackwalk/doc/fig/layout.tex
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

117 lines
4.3 KiB
TeX

\begin{figure}
\centering
\tikzstyle{class} = [rectangle, draw, minimum width=3cm, minimum height=1.5em,
font=\ttfamily, node distance=1.5em]
\tikzstyle{top} = [rectangle, minimum width=3cm, draw, minimum height=1.5em,
fill=white, draw=white]
\tikzstyle{annotate} = [rectangle]
\tikzstyle{code} = [rectangle, font=\ttfamily]
\tikzstyle{line} = [draw, -latex']
\begin{tikzpicture}[
every text node part/.style={align=left}
]
% Label
\node [annotate] (callstack) {\textbf{Call Stack}};
% The callstack
\node [top, below of=callstack] (dots) {...};
\node [class, below of=dots] (a) {a};
\node [class, below of=a] (b) {b};
\node [class, below of=b] (mainRA) {main's RA};
\node [class, below of=mainRA] (mainFP) {main's FP};
\node [class, below of=mainFP] (c) {C};
\node [class, below of=c] (fooRA) {foo's RA};
\node [class, below of=fooRA] (fooFP) {foo's FP};
\node [class, below of=fooFP] (d) {d};
% Registers
\node [annotate, below=1cm of d] (registers) {Registers};
\node [class, below of=registers] (FramePointer) {Frame Pointer};
\node [class, below of=FramePointer] (ProgramCounter) {Program Counter};
\node [class, below of=ProgramCounter] (StackPointer) {StackPointer};
% Left labels
\node [code, left=6cm of dots,anchor=north] (main) {void main() \{\\
\hspace{1cm}int a;\\
\hspace{1cm}foo(0);\\
\hspace{1cm}...\\
\}
};
\node [code, below=3cm of main.west,anchor=west] (foo) {void foo(int b) \{\\
\hspace{1cm}int c;\\
\hspace{1cm}bar();\\
\hspace{1cm}...\\
\}
};
\node [code, below=3cm of foo.west,anchor=west] (bar) {void bar() \{\\
\hspace{1cm}int d;\\
\hspace{1cm}while(1);\\
\}
};
% Callstack->callstack labels
\path [line] (mainFP.east) [bend right=20] to (dots.east);
\path [line] (fooFP.east) [bend right=40] to (mainFP.east);
\path [line] (FramePointer.east) [bend right=40] to (fooFP.east);
\path [line] (StackPointer.east) [bend right=40] to (d.east);
% Right labels
\node [code, left=2.5cm of dots,anchor=south] (mainFO) {main\textnormal{'s}\\ Frame Object};
\node [code, below=.25em of mainFO] (mainFPlabel) {FP};
\path [line] (mainFPlabel) -- (a.west);
\node [code, below=.25em of mainFPlabel] (mainRAlabel) {RA};
\path [line, dashed] (mainRAlabel) -- (mainRA.west);
\node [code, below=.25em of mainRAlabel] (mainSPlabel) {SP};
\path [line] (mainSPlabel) -- (mainFP.west);
\node [code, below=2.5cm of mainFO] (fooFO) {foo\textnormal{'s}\\ Frame Object};
\node [code, below=.25em of fooFO] (fooFPlabel) {FP};
\path [line] (fooFPlabel) -- (c.west);
\node [code, below=.25em of fooFPlabel] (fooRAlabel) {RA};
\path [line, dashed] (fooRAlabel) -- (fooRA.west);
\node [code, below=.25em of fooRAlabel] (fooSPlabel) {SP};
\path [line] (fooSPlabel) -- (fooFP.west);
\node [code, below=2.5cm of fooFO] (barFO) {bar\textnormal{'s}\\ Frame Object};
\node [code, below=.25em of barFO] (barFPlabel) {FP};
\path [line, dashed] (barFPlabel) -- (FramePointer.west);
\node [code, below=.25em of barFPlabel] (barRAlabel) {RA};
\path [line, dashed] (barRAlabel) -- (ProgramCounter.west);
\node [code, below=.25em of barRAlabel] (barSPlabel) {SP};
\path [line, dashed] (barSPlabel) -- (StackPointer.west);
% Callstack->source code labels
\path [line] (mainRAlabel.west) -- ($(main.south east) + (-.75cm, 2em)$);
\path [line] (fooRAlabel.west) -- ($(foo.south east) + (-1.5cm, 2em)$);
\path [line] (barRAlabel.west) -- ($(bar.south east) + (0, 2em)$);
\end{tikzpicture}
\begin{tikzpicture}[]
% Legend
\node [annotate] (la1) {A};
\node [annotate, right of=la1] (lb1) {B};
\path [line] (la1) -- (lb1);
\node [annotate, right=1cm of lb1] (l1) {A contains B's address};
\node [annotate, below=.5cm of la1] (la2) {A};
\node [annotate, right of=la2] (lb2) {B};
\path [line, dashed] (la2) -- (lb2);
\node [annotate, right=1cm of lb2] (l2) {A contains the contents of B};
% Legend Box
\node [rectangle, draw, fit=(la1)(lb1)(l1)(la2)(lb2)(l2)] (legendBox) {};
\node [rectangle, label=left: \rotatebox{90}{LEGEND},fit=(legendBox)] {};
\end{tikzpicture}
\caption{Stack Frame and Frame Object Layout (x86 Architecture)}
\label{fig:layout}
\end{figure}