Skip to content

Commit

Permalink
Retire instruction logging event type for context updates.
Browse files Browse the repository at this point in the history
Remove the event variant that bypasses log enable. This is useless as
switching on/off tracing around the event is feasible and the event is
rare enough that it is not a performance issue.
  • Loading branch information
qwattash committed Feb 25, 2022
1 parent ca70745 commit 9afdb4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions trace_extra/guest_context_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ void guest_context_tracker::mode_update(
void guest_context_tracker::context_update(const log_event_ctx_update_t *evt)
{
// Currently these are the only ones existing
assert((evt->op == LOG_EVENT_CTX_OP_SWITCH ||
evt->op == LOG_EVENT_CTX_OP_SETUP) &&
"Invalid ctx update op");
assert((evt->op == LOG_EVENT_CTX_OP_SWITCH) && "Invalid ctx update op");
/*
* Find or create the track associated with the new context and set it as
* the current context track on the CPU. This will be used to log
Expand Down
3 changes: 1 addition & 2 deletions trace_extra/trace_perfetto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ void process_events(perfetto_backend_data *data, cpu_log_entry_handle entry)
} break;
case LOG_EVENT_CTX_UPDATE: {
/* Swap current context. */
if (evt->ctx_update.op == LOG_EVENT_CTX_OP_SETUP ||
evt->ctx_update.op == LOG_EVENT_CTX_OP_SWITCH) {
if (evt->ctx_update.op == LOG_EVENT_CTX_OP_SWITCH) {
ctx_data->stats.pause(*ctx_track, perfetto_log_entry_pc(entry));
data->ctx_tracker_.context_update(&evt->ctx_update);
/* Reload data and track as context_update will have changed
Expand Down

0 comments on commit 9afdb4f

Please sign in to comment.