Hi David
I need to generate instruction trace for Freescale e500mc core. Please tell me 
whether I can use perf for that. 
If yes then please tell me some steps to do that.
Regards
Ranjit

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of David Ahern
Sent: Wednesday, March 30, 2011 1:36 AM
To: baozhao
Cc: [email protected]
Subject: Re: Fwd: perf trace cannot work with software events ?



On 03/29/11 10:55, baozhao wrote:
> zhao bao <baozhao <at> gmail.com> writes:
> 
> 
>> I applyed this patch in the builtin-script.c , recompile and install 
>> it. But I found it still doesn't  show any CR2 address info. The 
>> patch seems to list a addr column, but perf script still work as before.
> 
>  Hi, I think I find the problem.
> In builtin-script.c,   array output_fields should also be
> changed,PERF_OUTPUT_ADDR should added to  [PERF_TYPE_SOFTWARE],  am I 
> right?

The defaults do need to better detect when it exists. Until then you can add 
addr to the --fields option.


> 
> static u64 output_fields[PERF_TYPE_MAX] = {
>        ....
>       [PERF_TYPE_SOFTWARE] = PERF_OUTPUT_COMM | PERF_OUTPUT_TID | \
>                               PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | \
>                               PERF_OUTPUT_EVNAME | PERF_OUTPUT_SYM | \
>                               PERF_OUTPUT_ADDR,
> 
> 
> Here is the output:
> [root@localhost lab]#  /root/bin/perf script
>           hello  2229 [000]  1339.388865: page-faults: 0x804963c
>   c05ccbb3 clear_user ([kernel.kallsyms])
>           hello  2229 [000]  1339.388898: page-faults: 0x670834
>  c05ccbb3 clear_user ([kernel.kallsyms])
>           hello  2229 [000]  1339.388915: page-faults: 0xbf905d6b
>    c05cc70c __copy_to_user_ll ([kernel.kallsyms])
>           hello  2229 [000]  1339.388945: page-faults: 0x652870
>       870 _start (/lib/ld-2.13.so)
>           hello  2229 [000]  1339.388950: page-faults: 0x656920
>      4920 _dl_start (/lib/ld-2.13.so)
>           hello  2229 [000]  1339.388954: page-faults: 0x669acb
>     17acb __i686.get_pc_thunk.bx (/lib/ld-2.13.so)
>           hello  2229 [000]  1339.388958: page-faults: 0x66fe54
>      4939 _dl_start (/lib/ld-2.13.so)

And per another thread we can look at converting the sample addresses to 
symbols/dsos.

David


> 
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-perf-users" in the body of a message to 
> [email protected] More majordomo info at  
> http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in 
the body of a message to [email protected] More majordomo info at  
http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to