From: Andy Isaacson Date: Sat, 12 Jun 2010 03:36:15 +0000 (-0700) Subject: perf session: fix error message on failure to open perf.data X-Git-Tag: v2.6.36-rc1~532^2~64 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f2c3de2ba110626515234d5d584fb1b0c0749a2;p=pandora-kernel.git perf session: fix error message on failure to open perf.data If we cannot open our data file, print strerror(errno) for a more comprehensible error message; and only suggest 'perf record' on ENOENT. In particular, this fixes the nonsensical advice when: % sudo perf record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.009 MB perf.data (~381 samples) ] % perf trace failed to open file: perf.data (try 'perf record' first) % Cc: Ingo Molnar LPU-Reference: <20100612033615.GA24731@hexapodia.org> Signed-off-by: Andy Isaacson Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed