perf: Report errors when counter setup fails
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 14 Jun 2016 19:40:18 +0000 (15:40 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 17 Jun 2016 16:17:54 +0000 (12:17 -0400)
commitdb6cfc763152a4c44b05f5d4bc636a2bf62f32f3
tree95c174d3a290ba950a4965397597e451cf83a391
parent189f81d04f04d73f66b0a665056913bc3529827a
perf: Report errors when counter setup fails

Previously, the kernel would return a negative value for PED, but perf
would ignore it.  Then later we'd try to close it and would get a cryptic
value back (negative value out of range).

Now we try to provide helpful errstrs.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/perfmon.c
tools/profile/perf/perf_core.c