gem5
v24.0.0.0
Loading...
Searching...
No Matches
arch
arm
nativetrace.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006 The Regents of The University of Michigan
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are
7
* met: redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer;
9
* redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution;
12
* neither the name of the copyright holders nor the names of its
13
* contributors may be used to endorse or promote products derived from
14
* this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#ifndef __ARCH_ARM_NATIVETRACE_HH__
30
#define __ARCH_ARM_NATIVETRACE_HH__
31
32
#include "
base/types.hh
"
33
#include "
cpu/nativetrace.hh
"
34
#include "params/ArmNativeTrace.hh"
35
36
namespace
gem5
37
{
38
39
namespace
trace {
40
41
class
ArmNativeTrace
:
public
NativeTrace
42
{
43
public
:
44
enum
StateID
45
{
46
STATE_R0
,
47
STATE_R1
,
48
STATE_R2
,
49
STATE_R3
,
50
STATE_R4
,
51
STATE_R5
,
52
STATE_R6
,
53
STATE_R7
,
54
STATE_R8
,
55
STATE_R9
,
56
STATE_R10
,
57
STATE_R11
,
58
STATE_FP
=
STATE_R11
,
59
STATE_R12
,
60
STATE_R13
,
61
STATE_SP
=
STATE_R13
,
62
STATE_R14
,
63
STATE_LR
=
STATE_R14
,
64
STATE_R15
,
65
STATE_PC
=
STATE_R15
,
66
STATE_CPSR
,
67
STATE_F0
,
STATE_F1
,
STATE_F2
,
STATE_F3
,
STATE_F4
,
STATE_F5
,
STATE_F6
,
68
STATE_F7
,
STATE_F8
,
STATE_F9
,
STATE_F10
,
STATE_F11
,
STATE_F12
,
69
STATE_F13
,
STATE_F14
,
STATE_F15
,
STATE_F16
,
STATE_F17
,
STATE_F18
,
70
STATE_F19
,
STATE_F20
,
STATE_F21
,
STATE_F22
,
STATE_F23
,
STATE_F24
,
71
STATE_F25
,
STATE_F26
,
STATE_F27
,
STATE_F28
,
STATE_F29
,
STATE_F30
,
72
STATE_F31
,
STATE_FPSCR
,
73
STATE_NUMVALS
74
};
75
76
protected
:
77
struct
ThreadState
78
{
79
bool
changed
[
STATE_NUMVALS
];
80
uint64_t
state
[2][
STATE_NUMVALS
];
81
uint64_t *
newState
;
82
uint64_t *
oldState
;
83
int
current
;
84
void
update
(
NativeTrace
*parent);
85
void
update
(
ThreadContext
*tc);
86
87
ThreadState
()
88
{
89
for
(
int
i
= 0;
i
<
STATE_NUMVALS
;
i
++) {
90
changed
[
i
] =
false
;
91
state
[0][
i
] =
state
[1][
i
] = 0;
92
current
= 0;
93
newState
=
state
[0];
94
oldState
=
state
[1];
95
}
96
}
97
};
98
99
ThreadState
nState
,
mState
;
100
101
bool
stopOnPCError
;
102
103
public
:
104
using
Params
= ArmNativeTraceParams;
105
106
ArmNativeTrace
(
const
Params
&
p
) :
107
NativeTrace
(
p
),
stopOnPCError
(
p
.stop_on_pc_error)
108
{}
109
110
void
check
(
NativeTraceRecord
*record);
111
};
112
113
}
// namespace trace
114
}
// namespace gem5
115
116
#endif
// __ARCH_ARM_NATIVETRACE_HH__
types.hh
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition
guest_abi.test.cc:41
gem5::trace::ArmNativeTrace
Definition
nativetrace.hh:42
gem5::trace::ArmNativeTrace::mState
ThreadState mState
Definition
nativetrace.hh:99
gem5::trace::ArmNativeTrace::Params
ArmNativeTraceParams Params
Definition
nativetrace.hh:104
gem5::trace::ArmNativeTrace::ArmNativeTrace
ArmNativeTrace(const Params &p)
Definition
nativetrace.hh:106
gem5::trace::ArmNativeTrace::check
void check(NativeTraceRecord *record)
Definition
nativetrace.cc:144
gem5::trace::ArmNativeTrace::nState
ThreadState nState
Definition
nativetrace.hh:99
gem5::trace::ArmNativeTrace::StateID
StateID
Definition
nativetrace.hh:45
gem5::trace::ArmNativeTrace::STATE_SP
@ STATE_SP
Definition
nativetrace.hh:61
gem5::trace::ArmNativeTrace::STATE_R10
@ STATE_R10
Definition
nativetrace.hh:56
gem5::trace::ArmNativeTrace::STATE_F16
@ STATE_F16
Definition
nativetrace.hh:69
gem5::trace::ArmNativeTrace::STATE_R12
@ STATE_R12
Definition
nativetrace.hh:59
gem5::trace::ArmNativeTrace::STATE_F24
@ STATE_F24
Definition
nativetrace.hh:70
gem5::trace::ArmNativeTrace::STATE_F18
@ STATE_F18
Definition
nativetrace.hh:69
gem5::trace::ArmNativeTrace::STATE_F7
@ STATE_F7
Definition
nativetrace.hh:68
gem5::trace::ArmNativeTrace::STATE_R14
@ STATE_R14
Definition
nativetrace.hh:62
gem5::trace::ArmNativeTrace::STATE_F4
@ STATE_F4
Definition
nativetrace.hh:67
gem5::trace::ArmNativeTrace::STATE_R2
@ STATE_R2
Definition
nativetrace.hh:48
gem5::trace::ArmNativeTrace::STATE_F1
@ STATE_F1
Definition
nativetrace.hh:67
gem5::trace::ArmNativeTrace::STATE_F3
@ STATE_F3
Definition
nativetrace.hh:67
gem5::trace::ArmNativeTrace::STATE_F9
@ STATE_F9
Definition
nativetrace.hh:68
gem5::trace::ArmNativeTrace::STATE_F12
@ STATE_F12
Definition
nativetrace.hh:68
gem5::trace::ArmNativeTrace::STATE_F30
@ STATE_F30
Definition
nativetrace.hh:71
gem5::trace::ArmNativeTrace::STATE_F6
@ STATE_F6
Definition
nativetrace.hh:67
gem5::trace::ArmNativeTrace::STATE_F5
@ STATE_F5
Definition
nativetrace.hh:67
gem5::trace::ArmNativeTrace::STATE_R4
@ STATE_R4
Definition
nativetrace.hh:50
gem5::trace::ArmNativeTrace::STATE_R11
@ STATE_R11
Definition
nativetrace.hh:57
gem5::trace::ArmNativeTrace::STATE_R15
@ STATE_R15
Definition
nativetrace.hh:64
gem5::trace::ArmNativeTrace::STATE_F29
@ STATE_F29
Definition
nativetrace.hh:71
gem5::trace::ArmNativeTrace::STATE_F27
@ STATE_F27
Definition
nativetrace.hh:71
gem5::trace::ArmNativeTrace::STATE_F8
@ STATE_F8
Definition
nativetrace.hh:68
gem5::trace::ArmNativeTrace::STATE_PC
@ STATE_PC
Definition
nativetrace.hh:65
gem5::trace::ArmNativeTrace::STATE_R0
@ STATE_R0
Definition
nativetrace.hh:46
gem5::trace::ArmNativeTrace::STATE_F15
@ STATE_F15
Definition
nativetrace.hh:69
gem5::trace::ArmNativeTrace::STATE_R5
@ STATE_R5
Definition
nativetrace.hh:51
gem5::trace::ArmNativeTrace::STATE_F2
@ STATE_F2
Definition
nativetrace.hh:67
gem5::trace::ArmNativeTrace::STATE_FP
@ STATE_FP
Definition
nativetrace.hh:58
gem5::trace::ArmNativeTrace::STATE_F23
@ STATE_F23
Definition
nativetrace.hh:70
gem5::trace::ArmNativeTrace::STATE_FPSCR
@ STATE_FPSCR
Definition
nativetrace.hh:72
gem5::trace::ArmNativeTrace::STATE_F17
@ STATE_F17
Definition
nativetrace.hh:69
gem5::trace::ArmNativeTrace::STATE_F20
@ STATE_F20
Definition
nativetrace.hh:70
gem5::trace::ArmNativeTrace::STATE_F19
@ STATE_F19
Definition
nativetrace.hh:70
gem5::trace::ArmNativeTrace::STATE_F13
@ STATE_F13
Definition
nativetrace.hh:69
gem5::trace::ArmNativeTrace::STATE_CPSR
@ STATE_CPSR
Definition
nativetrace.hh:66
gem5::trace::ArmNativeTrace::STATE_R9
@ STATE_R9
Definition
nativetrace.hh:55
gem5::trace::ArmNativeTrace::STATE_R3
@ STATE_R3
Definition
nativetrace.hh:49
gem5::trace::ArmNativeTrace::STATE_F21
@ STATE_F21
Definition
nativetrace.hh:70
gem5::trace::ArmNativeTrace::STATE_F28
@ STATE_F28
Definition
nativetrace.hh:71
gem5::trace::ArmNativeTrace::STATE_F25
@ STATE_F25
Definition
nativetrace.hh:71
gem5::trace::ArmNativeTrace::STATE_R8
@ STATE_R8
Definition
nativetrace.hh:54
gem5::trace::ArmNativeTrace::STATE_LR
@ STATE_LR
Definition
nativetrace.hh:63
gem5::trace::ArmNativeTrace::STATE_F10
@ STATE_F10
Definition
nativetrace.hh:68
gem5::trace::ArmNativeTrace::STATE_F0
@ STATE_F0
Definition
nativetrace.hh:67
gem5::trace::ArmNativeTrace::STATE_F26
@ STATE_F26
Definition
nativetrace.hh:71
gem5::trace::ArmNativeTrace::STATE_F22
@ STATE_F22
Definition
nativetrace.hh:70
gem5::trace::ArmNativeTrace::STATE_F11
@ STATE_F11
Definition
nativetrace.hh:68
gem5::trace::ArmNativeTrace::STATE_R6
@ STATE_R6
Definition
nativetrace.hh:52
gem5::trace::ArmNativeTrace::STATE_F31
@ STATE_F31
Definition
nativetrace.hh:72
gem5::trace::ArmNativeTrace::STATE_R13
@ STATE_R13
Definition
nativetrace.hh:60
gem5::trace::ArmNativeTrace::STATE_R1
@ STATE_R1
Definition
nativetrace.hh:47
gem5::trace::ArmNativeTrace::STATE_NUMVALS
@ STATE_NUMVALS
Definition
nativetrace.hh:73
gem5::trace::ArmNativeTrace::STATE_F14
@ STATE_F14
Definition
nativetrace.hh:69
gem5::trace::ArmNativeTrace::STATE_R7
@ STATE_R7
Definition
nativetrace.hh:53
gem5::trace::ArmNativeTrace::stopOnPCError
bool stopOnPCError
Definition
nativetrace.hh:101
gem5::trace::NativeTraceRecord
Definition
nativetrace.hh:64
gem5::trace::NativeTrace
Definition
nativetrace.hh:78
nativetrace.hh
gem5::ArmISA::i
Bitfield< 7 > i
Definition
misc_types.hh:67
gem5::MipsISA::p
Bitfield< 0 > p
Definition
pra_constants.hh:326
gem5
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition
binary32.hh:36
gem5::trace::ArmNativeTrace::ThreadState
Definition
nativetrace.hh:78
gem5::trace::ArmNativeTrace::ThreadState::state
uint64_t state[2][STATE_NUMVALS]
Definition
nativetrace.hh:80
gem5::trace::ArmNativeTrace::ThreadState::update
void update(NativeTrace *parent)
Definition
nativetrace.cc:71
gem5::trace::ArmNativeTrace::ThreadState::ThreadState
ThreadState()
Definition
nativetrace.hh:87
gem5::trace::ArmNativeTrace::ThreadState::current
int current
Definition
nativetrace.hh:83
gem5::trace::ArmNativeTrace::ThreadState::newState
uint64_t * newState
Definition
nativetrace.hh:81
gem5::trace::ArmNativeTrace::ThreadState::oldState
uint64_t * oldState
Definition
nativetrace.hh:82
gem5::trace::ArmNativeTrace::ThreadState::changed
bool changed[STATE_NUMVALS]
Definition
nativetrace.hh:79
Generated on Tue Jun 18 2024 16:24:01 for gem5 by
doxygen
1.11.0