Em Tue, Nov 24, 2015 at 12:18:22PM +0100, Michael Petlan escreveu:
> Hi *,
>
> I have been playing with perf-probe tool and I found out that some bogus
> values of a function argument are obtained by perf-record.
>
> How to reproduce:
>
> gcc -O0 -g -o dummy dummy.c
> perf probe -x ./dummy --add 'isprime a'
> perf record -e probe_dummy:isprime ./dummy
> perf script
Checking this here, but as non root I get:
[acme@zoo ~]$ gcc -O0 -g -o isprime isprime.c
[acme@zoo ~]$ perf probe -x ./isprime --add 'isprime a'
Mapping for the register number 4113 missing on this architecture.
Sorry, we don't support this variable location yet.
Error: Failed to add events.
[acme@zoo ~]$
Masami, can you take a look at this?
More info:
[acme@zoo ~]$ cat /etc/fedora-release
Fedora release 21 (Twenty One)
[acme@zoo ~]$ uname -a
Linux zoo 4.3.0+ #1 SMP Thu Nov 12 11:29:01 BRT 2015 x86_64 x86_64 x86_64
GNU/Linux
>From readelf -wi, the isprime.c is the same as the one in Michael's original
>report.
Contents of the .debug_info section:
Compilation Unit @ offset 0x0:
Length: 0x12a (32-bit)
Version: 4
Abbrev Offset: 0x0
Pointer Size: 8
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_producer : (indirect string, offset: 0x7a): GNU C 4.9.2
20150212 (Red Hat 4.9.2-6) -mtune=generic -march=x86-64 -g -O0
<10> DW_AT_language : 1 (ANSI C)
<SNIP>
<1><87>: Abbrev Number: 5 (DW_TAG_subprogram)
<88> DW_AT_external : 1
<88> DW_AT_name : (indirect string, offset: 0xe): isprime
<8c> DW_AT_decl_file : 1
<8d> DW_AT_decl_line : 4
<8e> DW_AT_prototyped : 1
<8e> DW_AT_type : <0x34>
<92> DW_AT_low_pc : 0x400536
<9a> DW_AT_high_pc : 0x4d
<a2> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa)
<a4> DW_AT_GNU_all_call_sites: 1
<a4> DW_AT_sibling : <0xc1>
<2><a8>: Abbrev Number: 6 (DW_TAG_formal_parameter)
<a9> DW_AT_name : a
<ab> DW_AT_decl_file : 1
<ac> DW_AT_decl_line : 4
<ad> DW_AT_type : <0x34>
<b1> DW_AT_location : 2 byte block: 91 5c (DW_OP_fbreg: -36)
<SNIP>
--
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