Skip to content

Commit

Permalink
Fix broken kernel tracing in presence of offline CPUs
Browse files Browse the repository at this point in the history
Offline CPUs may be encountered in a number of scenarios, for instance
in the presence of virtualization through VMware Workstation, where the
product advertises 128 CPUs as present, but then only makes a
(configurable) subset of these available and online for use.
  • Loading branch information
shoffmeister committed Nov 24, 2023
1 parent 8343757 commit 0772e53
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,13 @@ int record_kernel_trace_pipe(struct uftrace_kernel_writer *kernel, int cpu, int
goto retry;
if (errno == EAGAIN)
return 0;
else
return -errno;

// offline CPU
if (errno == ENODEV) {
return 0;
}

return -errno;
}

if (n == 0)
Expand Down

0 comments on commit 0772e53

Please sign in to comment.