Skip to content

Commit 0a4935e

Browse files
committed
Remove log event variant that bypasses log enable.
After testing this was deemed unnecessary.
1 parent 655920a commit 0a4935e

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

Diff for: include/exec/log_instr.h

-18
Original file line numberDiff line numberDiff line change
@@ -202,24 +202,6 @@ bool qemu_log_instr_check_enabled(CPUArchState *env);
202202
#define qemu_log_instr_enabled(env) \
203203
unlikely(qemu_log_instr_check_enabled((env)))
204204

205-
/*
206-
* Helper macro to check whether an event should be appended to the trace or
207-
* not. This takes into account the event data to allow some events to be
208-
* appended to the current log buffer entry even when tracing is disabled. These
209-
* events will only become visible in the trace when tracing is started, in the
210-
* first log entry. This is intended to be used only for OS-driven events that
211-
* are relatively low-frequency w.r.t. the number of instructions executed.
212-
*/
213-
static inline bool qemu_log_instr_event_enabled(CPUArchState *env,
214-
log_event_t *event)
215-
{
216-
if (event->id == LOG_EVENT_CTX_UPDATE &&
217-
event->ctx_update.op == LOG_EVENT_CTX_OP_SETUP) {
218-
return true;
219-
}
220-
return qemu_log_instr_check_enabled(env);
221-
}
222-
223205
/*
224206
* Register a trace filter for a given CPU.
225207
*/

Diff for: include/qemu/log_instr.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,7 @@ typedef struct {
132132
typedef enum {
133133
/* Switch context from the current to the new (proc, thread, compartment) ID
134134
*/
135-
LOG_EVENT_CTX_OP_SWITCH = 0,
136-
/*
137-
* Same as LOG_EVENT_CTX_OP_SWITCH but should bypass tracing activation
138-
* status, Meaning that these events will reach the backend even when
139-
* tracing is off. This is useful setup the correct context identifier
140-
* before switching on tracing.
141-
*/
142-
LOG_EVENT_CTX_OP_SETUP = 1,
135+
LOG_EVENT_CTX_OP_SWITCH = 0
143136
} log_event_ctx_update_op_t;
144137

145138
/*

0 commit comments

Comments
 (0)