\hypertarget{hwpmc__arm64__md_8c_source}{}\doxysection{hwpmc\+\_\+arm64\+\_\+md.\+c}
\label{hwpmc__arm64__md_8c_source}\index{dev/hwpmc/hwpmc\_arm64\_md.c@{dev/hwpmc/hwpmc\_arm64\_md.c}}
\mbox{\hyperlink{hwpmc__arm64__md_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00003}00003 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00005}00005 \textcolor{comment}{ * This software was developed by the University of Cambridge Computer}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00006}00006 \textcolor{comment}{ * Laboratory with support from ARM Ltd.}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00008}00008 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00009}00009 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00010}00010 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00011}00011 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00015}00015 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00017}00017 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00018}00018 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00019}00019 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00020}00020 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00021}00021 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00022}00022 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00023}00023 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00024}00024 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00025}00025 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00026}00026 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00027}00027 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00028}00028 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00030}00030 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00031}\mbox{\hyperlink{hwpmc__arm64__md_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00031}} \mbox{\hyperlink{hwpmc__arm64__md_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/pmc.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <machine/cpu.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <machine/md\_var.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <machine/pmc\_mdep.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <machine/stack.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <vm/vm.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <vm/vm\_param.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <vm/pmap.h>}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00047}00047 \textcolor{keyword}{struct }pmc\_mdep *}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00048}\mbox{\hyperlink{hwpmc__arm64__md_8c_ad016c5700ad19b53141ad01c0c30cc7b}{00048}} \mbox{\hyperlink{hwpmc__arm64__md_8c_ad016c5700ad19b53141ad01c0c30cc7b}{pmc\_md\_initialize}}()}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00049}00049 \{}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00051}00051         \textcolor{keywordflow}{return} (\mbox{\hyperlink{hwpmc__arm64_8c_a8b62517cfc97053efe01bb95ad301520}{pmc\_arm64\_initialize}}());}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00052}00052 \}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00054}00054 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00055}\mbox{\hyperlink{hwpmc__arm64__md_8c_ac83a2d0310cfe67700cd701324816349}{00055}} \mbox{\hyperlink{hwpmc__arm64__md_8c_ac83a2d0310cfe67700cd701324816349}{pmc\_md\_finalize}}(\textcolor{keyword}{struct} pmc\_mdep *\mbox{\hyperlink{hwpmc__mod_8c_a1ff2c69106b0165abd4a60615e7d0a4b}{md}})}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00056}00056 \{}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00058}00058         \mbox{\hyperlink{hwpmc__arm64_8c_a080599963b14f7305e984761e7757be7}{pmc\_arm64\_finalize}}(\mbox{\hyperlink{hwpmc__mod_8c_a1ff2c69106b0165abd4a60615e7d0a4b}{md}});}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00059}00059 \}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00061}00061 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00062}\mbox{\hyperlink{hwpmc__arm64__md_8c_a7e6c5280b5c6ca82633a1c562b89863c}{00062}} \mbox{\hyperlink{hwpmc__arm64__md_8c_a7e6c5280b5c6ca82633a1c562b89863c}{pmc\_save\_kernel\_callchain}}(uintptr\_t *cc, \textcolor{keywordtype}{int} maxsamples,}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00063}00063     \textcolor{keyword}{struct} trapframe *tf)}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00064}00064 \{}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00065}00065         uintptr\_t pc, r, stackstart, stackend, fp;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00066}00066         \textcolor{keyword}{struct }thread *td;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00067}00067         \textcolor{keywordtype}{int} count;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00069}00069         KASSERT(TRAPF\_USERMODE(tf) == 0,(\textcolor{stringliteral}{"{}[arm64,\%d] not a kernel backtrace"{}},}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00070}00070             \_\_LINE\_\_));}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00072}00072         td = curthread;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00073}00073         pc = PMC\_TRAPFRAME\_TO\_PC(tf);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00074}00074         *cc++ = pc;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00076}00076         \textcolor{keywordflow}{if} (maxsamples <= 1)}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00077}00077                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00079}00079         stackstart = (uintptr\_t) td-\/>td\_kstack;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00080}00080         stackend = (uintptr\_t) td-\/>td\_kstack + td-\/>td\_kstack\_pages * PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00081}00081         fp = PMC\_TRAPFRAME\_TO\_FP(tf);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00083}00083         \textcolor{keywordflow}{if} (!PMC\_IN\_KERNEL(pc) ||}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00084}00084             !PMC\_IN\_KERNEL\_STACK(fp, stackstart, stackend))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00085}00085                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00087}00087         \textcolor{keywordflow}{for} (count = 1; count < maxsamples; count++) \{}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00088}00088                 \textcolor{comment}{/* Use saved lr as pc. */}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00089}00089                 r = fp + \textcolor{keyword}{sizeof}(uintptr\_t);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00090}00090                 \textcolor{keywordflow}{if} (!PMC\_IN\_KERNEL\_STACK(r, stackstart, stackend))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00091}00091                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00092}00092                 pc = *(uintptr\_t *)r;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00093}00093                 \textcolor{keywordflow}{if} (!PMC\_IN\_KERNEL(pc))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00094}00094                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00096}00096                 *cc++ = pc;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00098}00098                 \textcolor{comment}{/* Switch to next frame up */}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00099}00099                 r = fp;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00100}00100                 \textcolor{keywordflow}{if} (!PMC\_IN\_KERNEL\_STACK(r, stackstart, stackend))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00101}00101                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00102}00102                 fp = *(uintptr\_t *)r;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00103}00103                 \textcolor{keywordflow}{if} (!PMC\_IN\_KERNEL\_STACK(fp, stackstart, stackend))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00104}00104                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00105}00105         \}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00107}00107         \textcolor{keywordflow}{return} (count);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00108}00108 \}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00110}00110 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00111}\mbox{\hyperlink{hwpmc__arm64__md_8c_a1c21c5d17cf5a6eb2c19d9bb6f2f21c7}{00111}} \mbox{\hyperlink{hwpmc__arm64__md_8c_a1c21c5d17cf5a6eb2c19d9bb6f2f21c7}{pmc\_save\_user\_callchain}}(uintptr\_t *cc, \textcolor{keywordtype}{int} maxsamples,}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00112}00112     \textcolor{keyword}{struct} trapframe *tf)}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00113}00113 \{}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00114}00114         uintptr\_t pc, r, oldfp, fp;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00115}00115         \textcolor{keyword}{struct }thread *td;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00116}00116         \textcolor{keywordtype}{int} count;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00118}00118         KASSERT(TRAPF\_USERMODE(tf), (\textcolor{stringliteral}{"{}[arm64,\%d] Not a user trap frame tf=\%p"{}},}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00119}00119             \_\_LINE\_\_, (\textcolor{keywordtype}{void} *) tf));}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00121}00121         td = curthread;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00122}00122         pc = PMC\_TRAPFRAME\_TO\_PC(tf);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00123}00123         *cc++ = pc;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00125}00125         \textcolor{keywordflow}{if} (maxsamples <= 1)}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00126}00126                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00128}00128         oldfp = fp = PMC\_TRAPFRAME\_TO\_FP(tf);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00129}00129 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00130}00130         \textcolor{keywordflow}{if} (!PMC\_IN\_USERSPACE(pc) ||}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00131}00131             !PMC\_IN\_USERSPACE(fp))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00132}00132                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00134}00134         \textcolor{keywordflow}{for} (count = 1; count < maxsamples; count++) \{}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00135}00135                 \textcolor{comment}{/* Use saved lr as pc. */}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00136}00136                 r = fp + \textcolor{keyword}{sizeof}(uintptr\_t);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00137}00137                 \textcolor{keywordflow}{if} (copyin((\textcolor{keywordtype}{void} *)r, \&pc, \textcolor{keyword}{sizeof}(pc)) != 0)}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00138}00138                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00139}00139                 \textcolor{keywordflow}{if} (!PMC\_IN\_USERSPACE(pc))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00140}00140                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00142}00142                 *cc++ = pc;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00144}00144                 \textcolor{comment}{/* Switch to next frame up */}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00145}00145                 oldfp = fp;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00146}00146                 r = fp;}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00147}00147                 \textcolor{keywordflow}{if} (copyin((\textcolor{keywordtype}{void} *)r, \&fp, \textcolor{keyword}{sizeof}(fp)) != 0)}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00148}00148                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00149}00149                 \textcolor{keywordflow}{if} (fp < oldfp || !PMC\_IN\_USERSPACE(fp))}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00150}00150                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00151}00151         \}}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00153}00153         \textcolor{keywordflow}{return} (count);}
\DoxyCodeLine{\Hypertarget{hwpmc__arm64__md_8c_source_l00154}00154 \}}

\end{DoxyCode}
