Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367555 - Perf: use regex to parse events
Summary: Perf: use regex to parse events
Status: RESOLVED FIXED
Alias: None
Product: Linux Tools
Classification: Tools
Component: perf (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Daniel Henrique Barboza CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-26 12:22 EST by Wainer dos Santos Moschetta CLA
Modified: 2011-12-27 06:43 EST (History)
1 user (show)

See Also:


Attachments
Patch to fix the problem (2.96 KB, patch)
2011-12-26 12:23 EST, Wainer dos Santos Moschetta CLA
obusatto: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wainer dos Santos Moschetta CLA 2011-12-26 12:22:03 EST
Build Identifier: 

Events parser used to rely on line length of 'perf list' output. However, length might change between perf versions, 45 or 53.

Relying on line length is error prone. I'm going to attach a patch which changes way it parses events: using regex instead.

The patch was tested on:

SLES 11 SP1 (perf version 0.0.2.PERF)
Ubuntu 10.04.3 (perf version 0.0.2.PERF)
RHEL 6.2 (perf version 2.6.32-220.el6.ppc64.debug)

It would be nice someone testing on newer kernels (e.g. on Fedora 16)

Reproducible: Always
Comment 1 Wainer dos Santos Moschetta CLA 2011-12-26 12:23:12 EST
Created attachment 208804 [details]
Patch to fix the problem
Comment 2 Daniel Henrique Barboza CLA 2011-12-26 13:13:59 EST
Patch looks ok to me.
Comment 3 Otavio Pontes CLA 2011-12-27 06:43:29 EST
Resolved in commit 63afc3c97a7df4ebf67662145f7b9b6d4af68038