This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SYSTEMTAP TEST RESULTS : Kernel version 2.6.35-rc3 on POWER ppc64 architecture.


On 06/24/2010 02:25 PM, Mark Wielaard wrote:
> On Thu, 2010-06-24 at 14:03 -0500, David Smith wrote:
>> On 06/24/2010 02:10 AM, Divya Vikas wrote:
>>>> FAIL: buildok/syscall.stp
>>>
>>> This one is failing in syscall.pipe.
>>>
>>> Could you run the following command and show me the output: stap -L
>>> syscall.pipe
>>>
>>> semantic error: invalid access '[0]' vs. long int: operator '['
>>> at /usr/local/share/systemtap/tapset/syscalls2.stp:312:29
>>>         source: 			pipe0 = user_int(&$fildes[0]);
>>>                 			                         ^
>>> semantic error: invalid access '[1]' vs. long int: operator '[' at :313:29
>>>         source: 			pipe1 = user_int(&$fildes[1]);
>>>                 			                         ^
>>> syscall.pipe flags:long flag_str:string name:string fildes_uaddr:long
>>> pipe0:long pipe1:long argstr:string $fildes:long int $flags:long int
>>
>> That one is weird.  Systemtap thinks that '$fildes' is a 'long int', not
>> a 'long int *'.  From looking at the current kernel source it appears
>> that $fildes is still a pointer.  I got access to a f12 ppc64 machine
>> (running 2.6.32.12-115.fc12.ppc64) and it shows the same problems:
>>
>> # stap -L 'kernel.function("sys_pipe").call'
>> kernel.function("SyS_pipe@fs/pipe.c:1117").call $fildes:long int
>> # stap -L 'kernel.function("sys_pipe2").call'
>> kernel.function("SyS_pipe2@fs/pipe.c:1101").call $fildes:long int
>> $flags:long int
>>
>> Mark, do you have any ideas here?
> 
> Strange. That must the debuginfo is telling us that is the type. Which
> would indicate a gcc bug I presume.
> 
> Could you see what loc2c-test says about it?
> 
> When running with stap -vvv -L 'kernel.function("sys_pipe").call' it
> should output something like: finding location for local 'fildes' near
> address 0xc04cea4c, module bias 0x0

finding location for local 'fildes' near address 0xc0000000001e97b0,
module bias 0x0

> Then try:
> ./loc2c-test -e /usr/lib/debug/lib/modules/*/vmlinux 0xc04cea4c
> 
> Which should tell what we think can be accessed and what the types are
> around that address.

# ./loc2c-test -e
/usr/lib/debug/lib/modules/2.6.32.12-115.fc12.ppc64/vmlinux
0xc0000000001e97b0
    [125a54c] fs/pipe.c (0x11)
        console_printk                [1265bfb]	int[]
        hex_asc                       [1265c13]	char[] const
        ppc64_caches                  [1265c26]	ppc64_caches
        cur_cpu_spec                  [1265c33]	cpu_spec*
        mmu_psize_defs                [1265c50]	mmu_psize_def[]
        mmu_highuser_ssize            [1265c5d]	int
        local_paca                    [1265c6a]	paca_struct*
        paca                          [1265c88]	paca_struct[]
        __debugger                    [1265c95]	<unknown 0x15>*
        __debugger_ipi                [1265ca2]	<unknown 0x15>*
        __debugger_bpt                [1265caf]	<unknown 0x15>*
        __debugger_sstep              [1265cbc]	<unknown 0x15>*
        __debugger_iabr_match         [1265cc9]	<unknown 0x15>*
        __debugger_dabr_match         [1265cd6]	<unknown 0x15>*
        __debugger_fault_handler      [1265ce3]	<unknown 0x15>*
        CMO_PrPSP                     [1265cf0]	int
        CMO_SecPSP                    [1265cfe]	int
        CMO_PageSize                  [1265d0c]	long unsigned int
        node_states                   [1265d2a]	nodemask_t[]
        nr_online_nodes               [1265d38]	int
        page_group_by_mobility_disabled[1265d46]	int
        node_data                     [1265d64]	pg_data_t*[]
        nr_cpu_ids                    [1265d71]	int
        cpu_online_mask               [1265d7e]	cpumask const* const
        cpu_bit_bitmap                [1265da6]	long unsigned int[] const
        numa_cpu_lookup_table         [1265db9]	int[]
        mem_section                   [1265ddd]	mem_section*[]
        gfp_allowed_mask              [1265deb]	gfp_t
        debug_locks                   [1265df9]	int
        time_status                   [1265e06]	int
        jiffies                       [1265e13]	long unsigned int volatile
        timer_stats_active            [1265e20]	int
        __tracepoint_kmalloc          [1265e2d]	tracepoint
        __tracepoint_kmem_cache_alloc [1265e3a]	tracepoint
        __tracepoint_kmalloc_node     [1265e47]	tracepoint
        __tracepoint_kmem_cache_alloc_node[1265e54]	tracepoint
        __tracepoint_kfree            [1265e61]	tracepoint
        __tracepoint_kmem_cache_free  [1265e6e]	tracepoint
        __tracepoint_mm_page_free_direct[1265e7b]	tracepoint
        __tracepoint_mm_pagevec_free  [1265e88]	tracepoint
        __tracepoint_mm_page_alloc    [1265e96]	tracepoint
        __tracepoint_mm_page_alloc_zone_locked[1265ea4]	tracepoint
        __tracepoint_mm_page_pcpu_drain[1265eb2]	tracepoint
        __tracepoint_mm_page_alloc_extfrag[1265ec0]	tracepoint
        kmalloc_caches                [1265ede]	kmem_cache[]
        per_cpu__ppc64_tlb_batch      [1265eeb]	ppc64_tlb_batch
        per_cpu__vm_event_states      [1265ef8]	vm_event_state
        vm_stat                       [1265f05]	atomic_long_t[]
        swapper_space                 [1265f12]	address_space
        __invalid_size_argument_for_IOC[1265f20]	unsigned int
        dcache_lock                   [1265f2d]	spinlock_t
        init_pid_ns                   [1265f3a]	pid_namespace
        read_pipefifo_fops            [1265f47]	file_operations const
        write_pipefifo_fops           [1265f55]	file_operations const
        rdwr_pipefifo_fops            [1265f63]	file_operations const
        powerpc_firmware_features     [1265f71]	long unsigned int
        tb_ticks_per_sec              [1265f7e]	long unsigned int
        cputime_one_jiffy             [1265f8b]	cputime_t
        __cputime_jiffies_factor      [1265f98]	u64
        per_cpu__cputime_last_delta   [1265fa5]	long unsigned int
        per_cpu__cputime_scaled_last_delta[1265fb2]	long unsigned int
        __cputime_msec_factor         [1265fbf]	u64
        __cputime_sec_factor          [1265fcc]	u64
        __cputime_clockt_factor       [1265fd9]	u64
        percpu_counter_batch          [1265fe6]	int
        latencytop_enabled            [1265ff3]	int
        sched_mc_power_savings        [1266000]	int
        sched_smt_power_savings       [126600e]	int
        cad_pid                       [126601c]	pid*
        sysctl_timer_migration        [126602a]	unsigned int
        __tracepoint_module_load      [1266038]	tracepoint
        __tracepoint_module_free      [1266045]	tracepoint
        __tracepoint_module_get       [1266052]	tracepoint
        __tracepoint_module_put       [126605f]	tracepoint
        __tracepoint_module_request   [126606c]	tracepoint
        per_cpu____irq_regs           [1266079]	pt_regs*
        __kstrtab_pipe_lock           [1266096]	char[] const
        __ksymtab_pipe_lock           [12660b0]	kernel_symbol const
        __kstrtab_pipe_unlock         [12660d5]	char[] const
        __ksymtab_pipe_unlock         [12660ef]	kernel_symbol const
        anon_pipe_buf_ops             [1266104]	pipe_buf_operations const
        pipe_mnt                      [126611a]	vfsmount*
        pipefs_dentry_operations      [1266130]	dentry_operations const
        pipe_fs_type                  [1266146]	file_system_type
        __initcall_init_pipe_fs5      [126615c]	initcall_t
        __exitcall_exit_pipe_fs       [1266172]	exitcall_t
        console_printk                [1266188]	int[]
        hex_asc                       [1266195]	char[] const
        ppc64_caches                  [12661a8]	ppc64_caches
        cur_cpu_spec                  [12661b5]	cpu_spec*
        mmu_psize_defs                [12661c2]	mmu_psize_def[]
        mmu_highuser_ssize            [12661cf]	int
        local_paca                    [12661dc]	paca_struct*
        paca                          [12661ea]	paca_struct[]
        __debugger                    [12661f7]	<unknown 0x15>*
        __debugger_ipi                [1266204]	<unknown 0x15>*
        __debugger_bpt                [1266211]	<unknown 0x15>*
        __debugger_sstep              [126621e]	<unknown 0x15>*
        __debugger_iabr_match         [126622b]	<unknown 0x15>*
        __debugger_dabr_match         [1266238]	<unknown 0x15>*
        __debugger_fault_handler      [1266245]	<unknown 0x15>*
        CMO_PrPSP                     [1266252]	int
        CMO_SecPSP                    [1266260]	int
        CMO_PageSize                  [126626e]	long unsigned int
        node_states                   [126627c]	nodemask_t[]
        nr_online_nodes               [126628a]	int
        page_group_by_mobility_disabled[1266298]	int
        node_data                     [12662b0]	pglist_data*[]
        nr_cpu_ids                    [12662bd]	int
        cpu_online_mask               [12662ca]	cpumask const* const
        cpu_bit_bitmap                [12662d7]	long unsigned int[] const
        numa_cpu_lookup_table         [12662ea]	int[]
        mem_section                   [12662f7]	mem_section*[]
        gfp_allowed_mask              [1266305]	gfp_t
        debug_locks                   [1266313]	int
        time_status                   [1266320]	int
        jiffies                       [126632d]	long unsigned int volatile
        timer_stats_active            [126633a]	int
        __tracepoint_kmalloc          [1266347]	tracepoint
        __tracepoint_kmem_cache_alloc [1266354]	tracepoint
        __tracepoint_kmalloc_node     [1266361]	tracepoint
        __tracepoint_kmem_cache_alloc_node[126636e]	tracepoint
        __tracepoint_kfree            [126637b]	tracepoint
        __tracepoint_kmem_cache_free  [1266388]	tracepoint
        __tracepoint_mm_page_free_direct[1266395]	tracepoint
        __tracepoint_mm_pagevec_free  [12663a2]	tracepoint
        __tracepoint_mm_page_alloc    [12663b0]	tracepoint
        __tracepoint_mm_page_alloc_zone_locked[12663be]	tracepoint
        __tracepoint_mm_page_pcpu_drain[12663cc]	tracepoint
        __tracepoint_mm_page_alloc_extfrag[12663da]	tracepoint
        kmalloc_caches                [12663e8]	kmem_cache[]
        per_cpu__ppc64_tlb_batch      [12663f5]	ppc64_tlb_batch
        per_cpu__vm_event_states      [1266402]	vm_event_state
        vm_stat                       [126640f]	atomic_long_t[]
        swapper_space                 [126641c]	address_space
        __invalid_size_argument_for_IOC[126642a]	unsigned int
        dcache_lock                   [1266437]	spinlock_t
        init_pid_ns                   [1266444]	pid_namespace
        read_pipefifo_fops            [1266452]	file_operations const
        write_pipefifo_fops           [1266469]	file_operations const
        rdwr_pipefifo_fops            [1266480]	file_operations const
        powerpc_firmware_features     [1266497]	long unsigned int
        tb_ticks_per_sec              [12664a4]	long unsigned int
        cputime_one_jiffy             [12664b1]	cputime_t
        __cputime_jiffies_factor      [12664be]	u64
        per_cpu__cputime_last_delta   [12664cb]	long unsigned int
        per_cpu__cputime_scaled_last_delta[12664d8]	long unsigned int
        __cputime_msec_factor         [12664e5]	u64
        __cputime_sec_factor          [12664f2]	u64
        __cputime_clockt_factor       [12664ff]	u64
        percpu_counter_batch          [126650c]	int
        latencytop_enabled            [1266519]	int
        sched_mc_power_savings        [1266526]	int
        sched_smt_power_savings       [1266534]	int
        cad_pid                       [1266542]	pid*
        sysctl_timer_migration        [1266550]	unsigned int
        __tracepoint_module_load      [126655e]	tracepoint
        __tracepoint_module_free      [126656b]	tracepoint
        __tracepoint_module_get       [1266578]	tracepoint
        __tracepoint_module_put       [1266585]	tracepoint
        __tracepoint_module_request   [1266592]	tracepoint
        per_cpu____irq_regs           [126659f]	pt_regs*
        [1264912] SyS_pipe (0x2e): 0xc0000000001e97b0 (fs/pipe.c:1117)
.. 0xc0000000001e97f4 (fs/pipe.c:1031)
            fildes                        [1264936]	long int

> Then try:
> ./loc2c-test -e /usr/lib/debug/lib/modules/*/vmlinux 0xc04cea4c fildes
> 
> Which should tell how we think fildes needs to be accessed.

# ./loc2c-test -e
/usr/lib/debug/lib/modules/2.6.32.12-115.fc12.ppc64/vmlinux
0xc0000000001e97b0 fildes
#define PROBEADDR 0xc0000000001e97b0ULL
static void print_value(struct pt_regs *regs)
{
  intptr_t value;
  {
    { int64_t value = fetch_register (3); value = value; }
  }
  /* max expression stack depth 0 */
  printk (" ---> %ld\n", (unsigned long) value);
  return;
}

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]