more perf breakage from sample identifier
Adrian:
'perf kvm stat live' command fails on Linus' latest tree:
$ perf kvm stat live Failed to parse sample
git bisect points to:
75562573bab35b129cfd342fc2bcf89da84a6644 is the first bad commit commit 75562573bab35b129cfd342fc2bcf89da84a6644
Author: Adrian Hunter <[email protected]> Date: Tue Aug 27 11:23:09 2013 +0300
perf tools: Add support for PERF_SAMPLE_IDENTIFIER
Enable parsing of samples with sample format bitPERF_SAMPLE_IDENTIFIER.
In addition, if the kernel supports it, prefer it to selecting PERF_SAMPLE_ID thereby allowing non-matching sample types.
perf_evlist__event2evsel() is failing. From what I can see the problem is that evlist->heads is not getting populated. This command does not read/write files but processes events as they come in. I have another similar command that is also breaking for the same reason.
David
Quoted 20 lines · David Ahern
Adrian:
'perf kvm stat live' command fails on Linus' latest tree:
$ perf kvm stat live Failed to parse samplegit bisect points to:
75562573bab35b129cfd342fc2bcf89da84a6644is the first bad commit commit75562573bab35b129cfd342fc2bcf89da84a6644Author: Adrian Hunter <[email protected]> Date: Tue Aug 27 11:23:09 2013 +0300perf tools: Add support for
PERF_SAMPLE_IDENTIFIEREnable parsing of samples with sample format bit
PERF_SAMPLE_IDENTIFIER.
In addition, if the kernel supports it, prefer it to selectingPERF_SAMPLE_IDthereby allowing non-matching sample types.
Quoted 7 lines
Signed-off-by Adrian Hunter <[email protected]>
perf_evlist__event2evsel()is failing. From what I can see the problem is thatevlist->headsis not getting populated. This command does not read/write files but processes events as they come in. I have another similar command that is also breaking for the same reason.
That's not the problem. The hash is getting populated. The problem is a bad assumption on what fields are in the sample -- like PERF_SAMPLE_IP. The kvm command does not care about the IP so it is excluded:
attr->sample_type &= ~PERF_SAMPLE_IP;
If I remove that line the command works fine.
Since this a legitimate option to not get the IP in the sample, the evsel lookup code needs to get fixed in 3.12.
David