On 3/30/15 2:01 AM, Jiri Olsa wrote:
On Sun, Mar 29, 2015 at 04:30:01PM -0600, David Ahern wrote:
SNIP
+ fd = open(filename, O_RDONLY);
+ if (fd < 0) {
pr_debug("couldn't open %s\n", filename);
return 0;
}
- while (!comm[0] || (tgid <
On Sun, Mar 29, 2015 at 04:30:01PM -0600, David Ahern wrote:
SNIP
> + fd = open(filename, O_RDONLY);
> + if (fd < 0) {
> pr_debug("couldn't open %s\n", filename);
> return 0;
> }
>
> - while (!comm[0] || (tgid < 0)) {
> - if (fgets(bf, s
Rather than parsing /proc/pid/status file one line at a time, read
it into a buffer in one shot and search for all strings in one pass.
Signed-off-by: David Ahern
Cc: Don Zickus
Cc: Joe Mario
Cc: Jiri Olsa
---
tools/perf/util/event.c | 80 +++--
1 f
3 matches
Mail list logo