Skip to contentSkip to conversation

perf error codes

DISCUSSION Peter Zijlstra 3 participants 3 messages Jul 12, 2011

lore
Share & tools
lore
#0 lore raw

Hi Stephane, Vince,

Linus recently expressed dislike of our -ENOSPC usage for indicating the pmu is 'full'. Do either of your projects (libpfm, libpapi resp.) rely on this particular error code for this condition?

#1 lore raw

Hi,

Quoted 6 lines · Peter Zijlstra

Hi Stephane, Vince,

Linus recently expressed dislike of our -ENOSPC usage for indicating the pmu is 'full'. Do either of your projects (libpfm, libpapi resp.) rely on this particular error code for this condition?

libpfm does not make perf syscalls. It would not be impacted by a change in the error code.

I wonder what other meaningful code you might be able to use, though.

Thanks for asking.

Quoted 2 lines
#2 lore raw
In reply to Peter Zijlstra
Quoted 3 lines · Peter Zijlstra

Linus recently expressed dislike of our -ENOSPC usage for indicating the pmu is 'full'. Do either of your projects (libpfm, libpapi resp.) rely on this particular error code for this condition?

PAPI doesn't have any code that relies on ENOSPC.

I have to agree with Linus, when I was working on some validation tests and had the buffer size wrong it was very confusing when strerror() told me the problem was "No space left of device" when none of my disks were full. It took me a while (and some grepping of the kernel source) to figure out what was going on.

Vince