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.

Signed-off-by: Stefan Hoffmeister <[email protected]>
  • Loading branch information
shoffmeister authored and namhyung committed Dec 7, 2023
1 parent 00422e2 commit 4213eb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,10 @@ int record_kernel_trace_pipe(struct uftrace_kernel_writer *kernel, int cpu, int
if (n < 0) {
if (errno == EINTR)
goto retry;
if (errno == EAGAIN)
if (errno == EAGAIN || errno == ENODEV)
return 0;
else
return -errno;

return -errno;
}

if (n == 0)
Expand Down

0 comments on commit 4213eb7

Please sign in to comment.