Re: [PATCH 4/4] perf trace: Add option to specify machine type
From: David Ahern
Date: Thu Dec 05 2013 - 09:33:26 EST
On 12/5/13, 6:50 AM, Arnaldo Carvalho de Melo wrote:
Em Wed, Dec 04, 2013 at 07:41:42PM -0700, David Ahern escreveu:
Perhaps there is a better way to do this; I could not think of one and
I don't see any field in the tracepoint that can be leveraged. So ...
perf-trace autodetects the machine type (e.g., i386, x86_64, etc) via
libaudit.
And that means that using perf.data files from another machine, say,
ARM, will produce completely bogus results :-\
Indeed all offline analysis of trace data is wrong because it uses the
arch of the machine running perf. I am not hitting that problem, but
analysis on box.
We need a way to store this info in the perf.data header, i.e. use the
same algorithm that libaudit uses in audit_detect_machine() (and set the
open_id as well, btw) at 'perf record' time and store it somewhere.
What we have now that could be used?
Lets see:
[acme@zoo linux]$ perf report | grep 'arch'
# arch : x86_64
[acme@zoo linux]$
Would that be enough? Stephane?
That fixes one part -- using the arch in the file to translate system
calls in the file.
But it is a per process problem: Some are 32-bit; others are 64-bit. I
was hoping there was some option at the syscall entry level to tag the
bitness. And then there is the problem of needing a solution that works
from RHEL6 forward. This patch at least allows me to have sensible data
until something more clever is thought of.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/