Re: [PATCH 4/4] perf tools: Add support for breakpoint events inperf tools

From: Ingo Molnar
Date: Mon Nov 23 2009 - 12:38:41 EST



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> Add the breakpoint events support with this new sysnopsis:
>
> mem:addr[:access]
>
> Where addr is a raw addr value in the kernel and access can be
> either [r][w][x]
>
> Example to profile tasklist_lock:
>
> $ grep tasklist_lock /proc/kallsyms
> ffffffff8189c000 D tasklist_lock
>
> $ perf record -e mem:0xffffffff8189c000:rw -a -f -c 1

would be nice to also accept a plain cut & paste of an address in hexa
without the 0x prefix, i.e.:
$ perf record -e mem:ffffffff8189c000:rw -a -f -c 1

plus perf stat gets surprised by this new event and prints 'unknown':

$ grep tasklist_lock /proc/kallsyms
ffffffff81802000 D tasklist_lock
$ perf stat -a -e mem:0xffffffff81802000 sleep 1

Performance counter stats for 'sleep 1':

64 unknown

1.000833173 seconds time elapsed

Ingo
--
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/