public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* "no match" semantic error for some existing probe points
@ 2006-10-17 10:17 Gui,Jian
  2006-10-17 20:55 ` Frank Ch. Eigler
  0 siblings, 1 reply; 11+ messages in thread
From: Gui,Jian @ 2006-10-17 10:17 UTC (permalink / raw)
  To: systemtap

In my ppc64/2.6.18:

/root> stap -p2 -e 'probe kernel.function("ptrace_disable"){}'
# probes
kernel.function("ptrace_disable@arch/powerpc/kernel/ptrace.c:246")

/root>stap -vvv -p2 -e 'probe 
kernel.function("ptrace_disable@arch/powerpc/kernel/ptrace.c:246"){}'
Created temporary directory "/tmp/stapyDBwaZ"
Searched '/usr/local/share/systemtap/tapset/2.6.18/ppc64/*.stp', match 
count 0
Searched '/usr/local/share/systemtap/tapset/2.6.18/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/2.6/ppc64/*.stp', match 
count 0
Searched '/usr/local/share/systemtap/tapset/2.6/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/ppc64/*.stp', match count 1
Searched '/usr/local/share/systemtap/tapset/*.stp', match count 33
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.18/ppc64/*.stp', 
match count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.18/*.stp', match 
count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6/ppc64/*.stp', 
match count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/LKET/ppc64/*.stp', match 
count 0
Searched '/usr/local/share/systemtap/tapset/LKET/*.stp', match count 19
Pass 1: parsed user script and 53 library script(s) in 
580usr/0sys/670real ms.
parsed 'ptrace_disable@arch/powerpc/kernel/ptrace.c:246' -> func 
'ptrace_disable', file 'arch/powerpc/kernel/ptrace.c', line 246
pattern 'kernel' matches module 'kernel'
focused on module 'kernel' = [c000000000000000-c000000000801200, bias 0]
selected source file 'arch/powerpc/kernel/ptrace.c'
pattern 'ptrace_disable' matches function 'ptrace_disable'
selected function ptrace_disable
prologue searching function 'ptrace_disable' 
0xc000000000009db0-0xc000000000009dec@arch/powerpc/kernel/ptrace.c:246
checking line record 
0xc000000000009db0@arch/powerpc/kernel/ptrace-common.h:67
prologue found function 'ptrace_disable' (naked) = 0xc000000000009db0
pattern 'kernel' matches module 'kernel'
semantic error: no match for probe point
while: resolving probe point 
kernel.function("ptrace_disable@arch/powerpc/kernel/ptrace.c:246")
Pass 2: analyzed script: 0 probe(s), 0 function(s), 0 global(s) in 
640usr/60sys/789real ms.
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapyDBwaZ


It also failed in ppc64/2.6.17.9, but succeeded in i686/2.6.18.1.
Did anyone encouter similar problem before?

In addition to ptrace_disable, the following probe points also have
the same problem:
kernel.function("module_arch_cleanup@arch/powerpc/kernel/module_64.c:446")
kernel.function("pcibus_to_node@arch/powerpc/kernel/pci_64.c:1449")
kernel.function("iowrite16@arch/powerpc/kernel/iomap.c:46")
kernel.function("iowrite32@arch/powerpc/kernel/iomap.c:54")
kernel.function("flush_dcache_page@arch/powerpc/mm/mem.c:414")
kernel.function("mpic_end_ipi@arch/powerpc/sysdev/mpic.c:629")
kernel.function("oops_exit@kernel/panic.c:270")
kernel.function("sys_waitpid@kernel/exit.c:1649")
kernel.function("thread_cpu_nsleep@kernel/posix-cpu-timers.c:1544")
kernel.function("rt_mutex_destroy@kernel/rtmutex.c:910")
kernel.function("_spin_unlock@kernel/spinlock.c:306")
kernel.function("_read_unlock@kernel/spinlock.c:322")
kernel.function("_read_unlock_irq@kernel/spinlock.c:366")
kernel.function("nr_free_pagecache_pages@mm/page_alloc.c:1186")
kernel.function("kern_mount@fs/super.c:882")
kernel.function("page_symlink@fs/namei.c:2701")
kernel.function("get_inotify_watch@fs/inotify.c:103")
kernel.function("inotify_rm_watch@fs/inotify.c:714")
kernel.function("reiserfs_update_inode_transaction@fs/reiserfs/journal.c:3703")
kernel.function("indirect_decrement_key@fs/reiserfs/item_ops.c:225")
kernel.function("direntry_decrement_key@fs/reiserfs/item_ops.c:370")
kernel.function("ext3_follow_link@fs/ext3/symlink.c:27")
kernel.function("jbd_sync_bh@fs/jbd/checkpoint.c:148")
kernel.function("ext2_follow_link@fs/ext2/symlink.c:25")
kernel.function("ext2_init_security@fs/ext2/xattr_security.c:51")
kernel.function("nfs_increment_lock_seqid@fs/nfs/nfs4state.c:732")
kernel.function("blk_queue_free_tags@block/ll_rw_blk.c:891")
kernel.function("noop_merged_requests@block/noop-iosched.c:16")
kernel.function("exit_as_io_context@block/as-iosched.c:210")
kernel.function("fb_pad_aligned_buffer@drivers/video/fbmem.c:89")
kernel.function("fb_firmware_edid@drivers/video/fbmon.c:1329")
kernel.function("dummycon_dummy@drivers/video/console/dummycon.c:48")
kernel.function("MGA1064_reset@drivers/video/matrox/matroxfb_DAC1064.c:684")
kernel.function("mdio_write@drivers/net/3c59x.c:3061")
kernel.function("tg3_write32@drivers/net/tg3.c:360")
kernel.function("ide_mm_outb@drivers/ide/ide-iops.c:137")
kernel.function("ide_mm_outw@drivers/ide/ide-iops.c:147")
kernel.function("ide_mm_outl@drivers/ide/ide-iops.c:157")
kernel.function("usb_kick_khubd@drivers/usb/core/hub.c:288")
kernel.function("mon_stat_release@drivers/usb/mon/mon_stat.c:61")
kernel.function("input_link_handle@drivers/input/input.c:300")
kernel.function("dm_get@drivers/md/dm.c:1109")
kernel.function("tcp_rtt_estimator@net/ipv4/tcp_input.c:555")
kernel.function("tcp_v4_reqsk_send_ack@net/ipv4/tcp_ipv4.c:630")

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-10-17 10:17 "no match" semantic error for some existing probe points Gui,Jian
@ 2006-10-17 20:55 ` Frank Ch. Eigler
  2006-10-18  4:00   ` Gui,Jian
  0 siblings, 1 reply; 11+ messages in thread
From: Frank Ch. Eigler @ 2006-10-17 20:55 UTC (permalink / raw)
  To: Gui,Jian; +Cc: systemtap

"Gui,Jian" <guij@cn.ibm.com> writes:

> In my ppc64/2.6.18:

> [...]
> prologue found function 'ptrace_disable' (naked) = 0xc000000000009db0
> pattern 'kernel' matches module 'kernel'
> semantic error: no match for probe point
> while: resolving probe point
> kernel.function("ptrace_disable@arch/powerpc/kernel/ptrace.c:246")
> [...]

Something strange is happening here, probably a translator bug.  The
"no match for probe point" message occurs if no "derived_probe"
instances get accumulated for a particular probe construct in the
script.  But it should have been created.  Debugging this may require
probing the messiest part of the translator: tapsets.cxx, starting
at(say) query_cu.

- FChE

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-10-17 20:55 ` Frank Ch. Eigler
@ 2006-10-18  4:00   ` Gui,Jian
  2006-10-19  7:40     ` Gui,Jian
  0 siblings, 1 reply; 11+ messages in thread
From: Gui,Jian @ 2006-10-18  4:00 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Frank Ch. Eigler wrote:
 > Something strange is happening here, probably a translator bug.  The
 > "no match for probe point" message occurs if no "derived_probe"
 > instances get accumulated for a particular probe construct in the
 > script.  But it should have been created. Debugging this may require
 > probing the messiest part of the translator: tapsets.cxx, starting
 > at(say) query_cu.
 >
 > - FChE
 >
Thanks. I debugged the translation and found the first error comes
from the dwflpp::die_has_pc(die, pc) call in query_srcfile_line().

In the ptrace_disable case, a wrong pc address causes this failure:
   dwflpp::die_has_pc (this=0x106fcdf8, die=0x10d00c94,
                   pc=0xc000000000009e10)

But "objdump -D /boot/vmlinux-2.6.18" shows 0xc000000000009e10 is
out of range:

c000000000009db0 <.ptrace_disable>:
c000000000009db0:       e9 23 03 00     ld      r9,768(r3)
c000000000009db4:       39 60 02 00     li      r11,512
c000000000009db8:       2f a9 00 00     cmpdi   cr7,r9,0
c000000000009dbc:       41 9e 00 14     beq-    cr7,c000000000009dd0
<.ptrace_disable+0x20>
c000000000009dc0:       e8 09 01 08     ld      r0,264(r9)
c000000000009dc4:       78 00 a8 42     rldicl  r0,r0,53,1
c000000000009dc8:       78 00 58 00     rotldi  r0,r0,11
c000000000009dcc:       f8 09 01 08     std     r0,264(r9)
c000000000009dd0:       e9 23 00 08     ld      r9,8(r3)
c000000000009dd4:       38 09 00 80     addi    r0,r9,128
c000000000009dd8:       7d 40 00 a8     ldarx   r10,0,r0
c000000000009ddc:       7d 4a 58 78     andc    r10,r10,r11
c000000000009de0:       7d 40 01 ad     stdcx.  r10,0,r0
c000000000009de4:       40 a2 ff f4     bne-    c000000000009dd8
<.ptrace_disable+0x28>
c000000000009de8:       4e 80 00 20     blr

I am still looking at how the wrong pc address is generated.

btw: I am using elfutils-0.123-0.1 /gcc 3.4.6 20060404
            /systemtap-20061017 /RHEL4U3 /2.6.18 /ppc64

-Guijian


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-10-18  4:00   ` Gui,Jian
@ 2006-10-19  7:40     ` Gui,Jian
  2006-10-24 17:58       ` Roland McGrath
  0 siblings, 1 reply; 11+ messages in thread
From: Gui,Jian @ 2006-10-19  7:40 UTC (permalink / raw)
  To: systemtap; +Cc: Frank Ch. Eigler

[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]

> In the ptrace_disable case, a wrong pc address causes this failure:
>   dwflpp::die_has_pc (this=0x106fcdf8, die=0x10d00c94,
>                   pc=0xc000000000009e10)
> 
> But "objdump -D /boot/vmlinux-2.6.18" shows 0xc000000000009e10 is
> out of range:
> 
I think this error is due to the incomplete .debug_line information
generated by GCC.

Here is the entry of ptrace_disable in the .debug_info section of
vmlinux-2.6.18:
  <1><4670f>: Abbrev Number: 47 (DW_TAG_subprogram)
      DW_AT_sibling     : <467d3>
      DW_AT_external    : 1
      DW_AT_name        : (indirect string, offset: 0x4aa5): 
ptrace_disable
      DW_AT_decl_file   : 1
      DW_AT_decl_line   : 246
      DW_AT_prototyped  : 1
      DW_AT_low_pc      : 0x9db0
      DW_AT_high_pc     : 0x9dec
      DW_AT_frame_base  : 1 byte block: 51       (DW_OP_reg1)

But in the .debug_line section, there is no line info for
"arch/powerpc/kernel/ptrace.c:246" (see attachment).
The closest(>=246) is "arch/powerpc/kernel/ptrace.c:252", which
belongs to the next function.

When dwarf_getsrc_file() is called with lineno=246, it scans these
line info and choose "arch/powerpc/kernel/ptrace.c:252" as the best
match. The corresponding addr in the result is 0xc000000000009e10.

This addr is used to call dwarf_haspc() in dwflpp::die_has_pc, to
check whether it belongs to ptrace_disable. In dwarf_haspc():
   begin = 0xc000000000009db0,
   end   = 0xc000000000009dec,
   pc    = 0xc000000000009e10.
Here, pc addr is out of range. That's why this call failed.

Is it a GCC bug? or is it the expected behavior considering GCC's
optimizations? for ptrace_disable() is like:

     245 void ptrace_disable(struct task_struct *child)
     246 {
     247         /* make sure the single step bit is not set. */
     248         clear_single_step(child);
     249 }

Any idea? thanks.


-Guijian


[-- Attachment #2: debug_line --]
[-- Type: text/plain, Size: 24655 bytes --]

 The File Name Table:
  Entry	Dir	Time	Size	Name
  1	1	0	0	ptrace.c
  2	1	0	0	ptrace-common.h
  3	2	0	0	bitops.h
  4	3	0	0	thread_info.h
  5	3	0	0	signal.h
  6	2	0	0	thread_info.h
  7	4	0	0	non-atomic.h
  8	3	0	0	seccomp.h
  9	2	0	0	processor.h
  10	3	0	0	sched.h
  11	2	0	0	atomic.h
  12	3	0	0	list.h
  13	3	0	0	cpumask.h
  14	2	0	0	mmu.h
  15	2	0	0	page.h
  16	3	0	0	mm.h
  17	3	0	0	rbtree.h
  18	3	0	0	prio_tree.h
  19	3	0	0	spinlock_types.h
  20	2	0	0	spinlock_types.h
  21	3	0	0	nodemask.h
  22	3	0	0	mmzone.h
  23	3	0	0	fs.h
  24	3	0	0	rcupdate.h
  25	3	0	0	fs_struct.h
  26	3	0	0	dcache.h
  27	2	0	0	types.h
  28	3	0	0	types.h
  29	2	0	0	posix_types.h
  30	3	0	0	time.h
  31	3	0	0	mutex.h
  32	3	0	0	rwsem.h
  33	2	0	0	rwsem.h
  34	3	0	0	sysfs.h
  35	3	0	0	stat.h
  36	3	0	0	aio.h
  37	3	0	0	wait.h
  38	3	0	0	workqueue.h
  39	3	0	0	timer.h
  40	3	0	0	aio_abi.h
  41	3	0	0	nfs_fs_i.h
  42	3	0	0	lockdep.h
  43	3	0	0	quota.h
  44	3	0	0	dqblk_xfs.h
  45	3	0	0	dqblk_v1.h
  46	3	0	0	dqblk_v2.h
  47	3	0	0	radix-tree.h
  48	5	0	0	atomic.h
  49	3	0	0	kernel.h
  50	3	0	0	completion.h
  51	3	0	0	binfmts.h
  52	3	0	0	capability.h
  53	2	0	0	ptrace.h
  54	3	0	0	pid.h
  55	2	0	0	cputime.h
  56	3	0	0	sem.h
  57	2	0	0	signal.h
  58	3	0	0	hrtimer.h
  59	3	0	0	ktime.h
  60	3	0	0	resource.h
  61	5	0	0	signal.h
  62	3	0	0	plist.h
  63	5	0	0	siginfo.h
  64	3	0	0	futex.h
  65	2	0	0	cache.h
  66	2	0	0	cputable.h
  67	2	0	0	system.h
  68	2	0	0	paca.h
  69	2	0	0	lppaca.h
  70	3	0	0	timex.h
  71	3	0	0	jiffies.h
  72	2	0	0	mmzone.h
  73	3	0	0	slab.h
  74	2	0	0	time.h
  75	2	0	0	tlbflush.h
  76	3	0	0	vmstat.h

 Line Number Statements:
  Set File Name to entry 2 in the File Name Table
  Extended opcode 2: set Address to 0x9db0
  Advance Line by 66 to 67
  Copy
  Set File Name to entry 3 in the File Name Table
  Advance Line by 9 to 76
  Special opcode 19: advance Address by 4 to 0x9db4 and Line by 0 to 76
  Set File Name to entry 2 in the File Name Table
  Advance Line by -8 to 68
  Special opcode 19: advance Address by 4 to 0x9db8 and Line by 0 to 68
  Special opcode 34: advance Address by 8 to 0x9dc0 and Line by 1 to 69
  Set File Name to entry 4 in the File Name Table
  Advance Line by -33 to 36
  Special opcode 61: advance Address by 16 to 0x9dd0 and Line by 0 to 36
  Set File Name to entry 3 in the File Name Table
  Advance Line by 38 to 74
  Special opcode 19: advance Address by 4 to 0x9dd4 and Line by 0 to 74
  Special opcode 24: advance Address by 4 to 0x9dd8 and Line by 5 to 79
  Set File Name to entry 1 in the File Name Table
  Advance Line by 173 to 252
  Special opcode 75: advance Address by 20 to 0x9dec and Line by 0 to 252
  Special opcode 22: advance Address by 4 to 0x9df0 and Line by 3 to 255
  Special opcode 16: advance Address by 4 to 0x9df4 and Line by -3 to 252
  Special opcode 103: advance Address by 28 to 0x9e10 and Line by 0 to 252
  Special opcode 22: advance Address by 4 to 0x9e14 and Line by 3 to 255
  Advance PC by 164 to 9eb8
  Special opcode 12: advance Address by 0 to 0x9eb8 and Line by 7 to 262
  Special opcode 62: advance Address by 16 to 0x9ec8 and Line by 1 to 263
  Special opcode 18: advance Address by 4 to 0x9ecc and Line by -1 to 262
  Special opcode 35: advance Address by 8 to 0x9ed4 and Line by 2 to 264
  Special opcode 35: advance Address by 8 to 0x9edc and Line by 2 to 266
  Advance Line by 16 to 282
  Special opcode 173: advance Address by 48 to 0x9f0c and Line by 0 to 282
  Special opcode 18: advance Address by 4 to 0x9f10 and Line by -1 to 281
  Advance Line by -7 to 274
  Special opcode 19: advance Address by 4 to 0x9f14 and Line by 0 to 274
  Special opcode 27: advance Address by 4 to 0x9f18 and Line by 8 to 282
  Special opcode 110: advance Address by 28 to 0x9f34 and Line by 7 to 289
  Set File Name to entry 2 in the File Name Table
  Advance Line by -265 to 24
  Special opcode 33: advance Address by 8 to 0x9f3c and Line by 0 to 24
  Special opcode 20: advance Address by 4 to 0x9f40 and Line by 1 to 25
  Special opcode 25: advance Address by 4 to 0x9f44 and Line by 6 to 31
  Special opcode 34: advance Address by 8 to 0x9f4c and Line by 1 to 32
  Special opcode 20: advance Address by 4 to 0x9f50 and Line by 1 to 33
  Special opcode 18: advance Address by 4 to 0x9f54 and Line by -1 to 32
  Special opcode 20: advance Address by 4 to 0x9f58 and Line by 1 to 33
  Special opcode 34: advance Address by 8 to 0x9f60 and Line by 1 to 34
  Special opcode 34: advance Address by 8 to 0x9f68 and Line by 1 to 35
  Advance Line by -11 to 24
  Special opcode 47: advance Address by 12 to 0x9f74 and Line by 0 to 24
  Set File Name to entry 1 in the File Name Table
  Advance Line by 268 to 292
  Special opcode 33: advance Address by 8 to 0x9f7c and Line by 0 to 292
  Special opcode 34: advance Address by 8 to 0x9f84 and Line by 1 to 293
  Special opcode 49: advance Address by 12 to 0x9f90 and Line by 2 to 295
  Special opcode 167: advance Address by 44 to 0x9fbc and Line by 8 to 303
  Special opcode 60: advance Address by 16 to 0x9fcc and Line by -1 to 302
  Special opcode 20: advance Address by 4 to 0x9fd0 and Line by 1 to 303
  Special opcode 64: advance Address by 16 to 0x9fe0 and Line by 3 to 306
  Special opcode 20: advance Address by 4 to 0x9fe4 and Line by 1 to 307
  Advance Line by 14 to 321
  Special opcode 19: advance Address by 4 to 0x9fe8 and Line by 0 to 321
  Special opcode 18: advance Address by 4 to 0x9fec and Line by -1 to 320
  Advance Line by -7 to 313
  Special opcode 19: advance Address by 4 to 0x9ff0 and Line by 0 to 313
  Special opcode 27: advance Address by 4 to 0x9ff4 and Line by 8 to 321
  Special opcode 110: advance Address by 28 to 0xa010 and Line by 7 to 328
  Special opcode 35: advance Address by 8 to 0xa018 and Line by 2 to 330
  Set File Name to entry 2 in the File Name Table
  Advance Line by -284 to 46
  Special opcode 33: advance Address by 8 to 0xa020 and Line by 0 to 46
  Special opcode 26: advance Address by 4 to 0xa024 and Line by 7 to 53
  Advance Line by -6 to 47
  Special opcode 19: advance Address by 4 to 0xa028 and Line by 0 to 47
  Special opcode 34: advance Address by 8 to 0xa030 and Line by 1 to 48
  Special opcode 34: advance Address by 8 to 0xa038 and Line by 1 to 49
  Special opcode 91: advance Address by 24 to 0xa050 and Line by 2 to 51
  Set File Name to entry 1 in the File Name Table
  Advance Line by 282 to 333
  Special opcode 75: advance Address by 20 to 0xa064 and Line by 0 to 333
  Special opcode 34: advance Address by 8 to 0xa06c and Line by 1 to 334
  Special opcode 34: advance Address by 8 to 0xa074 and Line by 1 to 335
  Special opcode 18: advance Address by 4 to 0xa078 and Line by -1 to 334
  Special opcode 36: advance Address by 8 to 0xa080 and Line by 3 to 337
  Set File Name to entry 5 in the File Name Table
  Advance Line by -105 to 232
  Special opcode 19: advance Address by 4 to 0xa084 and Line by 0 to 232
  Set File Name to entry 1 in the File Name Table
  Advance Line by 110 to 342
  Special opcode 19: advance Address by 4 to 0xa088 and Line by 0 to 342
  Set File Name to entry 5 in the File Name Table
  Advance Line by -110 to 232
  Special opcode 19: advance Address by 4 to 0xa08c and Line by 0 to 232
  Set File Name to entry 1 in the File Name Table
  Advance Line by 113 to 345
  Special opcode 33: advance Address by 8 to 0xa094 and Line by 0 to 345
  Set File Name to entry 3 in the File Name Table
  Advance Line by -288 to 57
  Special opcode 47: advance Address by 12 to 0xa0a0 and Line by 0 to 57
  Special opcode 21: advance Address by 4 to 0xa0a4 and Line by 2 to 59
  Special opcode 22: advance Address by 4 to 0xa0a8 and Line by 3 to 62
  Advance Line by 12 to 74
  Special opcode 75: advance Address by 20 to 0xa0bc and Line by 0 to 74
  Special opcode 21: advance Address by 4 to 0xa0c0 and Line by 2 to 76
  Special opcode 22: advance Address by 4 to 0xa0c4 and Line by 3 to 79
  Set File Name to entry 2 in the File Name Table
  Advance Line by -12 to 67
  Special opcode 61: advance Address by 16 to 0xa0d4 and Line by 0 to 67
  Set File Name to entry 1 in the File Name Table
  Advance Line by 282 to 349
  Special opcode 19: advance Address by 4 to 0xa0d8 and Line by 0 to 349
  Set File Name to entry 2 in the File Name Table
  Advance Line by -281 to 68
  Special opcode 19: advance Address by 4 to 0xa0dc and Line by 0 to 68
  Set File Name to entry 1 in the File Name Table
  Advance Line by 281 to 349
  Special opcode 19: advance Address by 4 to 0xa0e0 and Line by 0 to 349
  Set File Name to entry 2 in the File Name Table
  Advance Line by -281 to 68
  Special opcode 19: advance Address by 4 to 0xa0e4 and Line by 0 to 68
  Special opcode 20: advance Address by 4 to 0xa0e8 and Line by 1 to 69
  Set File Name to entry 4 in the File Name Table
  Advance Line by -33 to 36
  Special opcode 61: advance Address by 16 to 0xa0f8 and Line by 0 to 36
  Set File Name to entry 3 in the File Name Table
  Advance Line by 40 to 76
  Special opcode 19: advance Address by 4 to 0xa0fc and Line by 0 to 76
  Special opcode 17: advance Address by 4 to 0xa100 and Line by -2 to 74
  Special opcode 24: advance Address by 4 to 0xa104 and Line by 5 to 79
  Set File Name to entry 1 in the File Name Table
  Advance Line by 274 to 353
  Special opcode 61: advance Address by 16 to 0xa114 and Line by 0 to 353
  Special opcode 18: advance Address by 4 to 0xa118 and Line by -1 to 352
  Advance Line by 12 to 364
  Special opcode 33: advance Address by 8 to 0xa120 and Line by 0 to 364
  Special opcode 18: advance Address by 4 to 0xa124 and Line by -1 to 363
  Special opcode 20: advance Address by 4 to 0xa128 and Line by 1 to 364
  Set File Name to entry 2 in the File Name Table
  Advance Line by -297 to 67
  Special opcode 33: advance Address by 8 to 0xa130 and Line by 0 to 67
  Set File Name to entry 1 in the File Name Table
  Advance Line by 299 to 366
  Special opcode 19: advance Address by 4 to 0xa134 and Line by 0 to 366
  Set File Name to entry 2 in the File Name Table
  Advance Line by -298 to 68
  Special opcode 33: advance Address by 8 to 0xa13c and Line by 0 to 68
  Special opcode 34: advance Address by 8 to 0xa144 and Line by 1 to 69
  Set File Name to entry 4 in the File Name Table
  Advance Line by -33 to 36
  Special opcode 61: advance Address by 16 to 0xa154 and Line by 0 to 36
  Set File Name to entry 3 in the File Name Table
  Advance Line by 40 to 76
  Special opcode 19: advance Address by 4 to 0xa158 and Line by 0 to 76
  Special opcode 17: advance Address by 4 to 0xa15c and Line by -2 to 74
  Special opcode 24: advance Address by 4 to 0xa160 and Line by 5 to 79
  Set File Name to entry 5 in the File Name Table
  Advance Line by 153 to 232
  Special opcode 75: advance Address by 20 to 0xa174 and Line by 0 to 232
  Set File Name to entry 1 in the File Name Table
  Advance Line by 142 to 374
  Special opcode 19: advance Address by 4 to 0xa178 and Line by 0 to 374
  Set File Name to entry 5 in the File Name Table
  Advance Line by -142 to 232
  Special opcode 19: advance Address by 4 to 0xa17c and Line by 0 to 232
  Set File Name to entry 4 in the File Name Table
  Advance Line by -196 to 36
  Special opcode 19: advance Address by 4 to 0xa180 and Line by 0 to 36
  Set File Name to entry 3 in the File Name Table
  Advance Line by 40 to 76
  Special opcode 19: advance Address by 4 to 0xa184 and Line by 0 to 76
  Special opcode 17: advance Address by 4 to 0xa188 and Line by -2 to 74
  Special opcode 24: advance Address by 4 to 0xa18c and Line by 5 to 79
  Set File Name to entry 2 in the File Name Table
  Advance Line by -20 to 59
  Special opcode 61: advance Address by 16 to 0xa19c and Line by 0 to 59
  Special opcode 20: advance Address by 4 to 0xa1a0 and Line by 1 to 60
  Special opcode 34: advance Address by 8 to 0xa1a8 and Line by 1 to 61
  Set File Name to entry 4 in the File Name Table
  Advance Line by -30 to 31
  Special opcode 47: advance Address by 12 to 0xa1b4 and Line by 0 to 31
  Set File Name to entry 3 in the File Name Table
  Advance Line by 28 to 59
  Special opcode 19: advance Address by 4 to 0xa1b8 and Line by 0 to 59
  Special opcode 17: advance Address by 4 to 0xa1bc and Line by -2 to 57
  Special opcode 24: advance Address by 4 to 0xa1c0 and Line by 5 to 62
  Set File Name to entry 1 in the File Name Table
  Advance Line by 317 to 379
  Special opcode 61: advance Address by 16 to 0xa1d0 and Line by 0 to 379
  Special opcode 22: advance Address by 4 to 0xa1d4 and Line by 3 to 382
  Special opcode 16: advance Address by 4 to 0xa1d8 and Line by -3 to 379
  Special opcode 21: advance Address by 4 to 0xa1dc and Line by 2 to 381
  Special opcode 35: advance Address by 8 to 0xa1e4 and Line by 2 to 383
  Special opcode 26: advance Address by 4 to 0xa1e8 and Line by 7 to 390
  Special opcode 17: advance Address by 4 to 0xa1ec and Line by -2 to 388
  Special opcode 21: advance Address by 4 to 0xa1f0 and Line by 2 to 390
  Special opcode 21: advance Address by 4 to 0xa1f4 and Line by 2 to 392
  Special opcode 161: advance Address by 44 to 0xa220 and Line by 2 to 394
  Set File Name to entry 2 in the File Name Table
  Advance Line by -248 to 146
  Special opcode 19: advance Address by 4 to 0xa224 and Line by 0 to 146
  Set File Name to entry 6 in the File Name Table
  Advance Line by -51 to 95
  Special opcode 47: advance Address by 12 to 0xa230 and Line by 0 to 95
  Set File Name to entry 2 in the File Name Table
  Advance Line by 55 to 150
  Special opcode 19: advance Address by 4 to 0xa234 and Line by 0 to 150
  Set File Name to entry 7 in the File Name Table
  Advance Line by -42 to 108
  Special opcode 19: advance Address by 4 to 0xa238 and Line by 0 to 108
  Set File Name to entry 4 in the File Name Table
  Advance Line by -57 to 51
  Special opcode 19: advance Address by 4 to 0xa23c and Line by 0 to 51
  Set File Name to entry 2 in the File Name Table
  Advance Line by 99 to 150
  Special opcode 145: advance Address by 40 to 0xa264 and Line by 0 to 150
  Set File Name to entry 4 in the File Name Table
  Advance Line by -99 to 51
  Special opcode 19: advance Address by 4 to 0xa268 and Line by 0 to 51
  Set File Name to entry 2 in the File Name Table
  Advance Line by 103 to 154
  Special opcode 19: advance Address by 4 to 0xa26c and Line by 0 to 154
  Special opcode 78: advance Address by 20 to 0xa280 and Line by 3 to 157
  Set File Name to entry 1 in the File Name Table
  Advance Line by 246 to 403
  Special opcode 47: advance Address by 12 to 0xa28c and Line by 0 to 403
  Special opcode 80: advance Address by 20 to 0xa2a0 and Line by 5 to 408
  Special opcode 20: advance Address by 4 to 0xa2a4 and Line by 1 to 409
  Special opcode 21: advance Address by 4 to 0xa2a8 and Line by 2 to 411
  Special opcode 48: advance Address by 12 to 0xa2b4 and Line by 1 to 412
  Special opcode 116: advance Address by 32 to 0xa2d4 and Line by -1 to 411
  Special opcode 23: advance Address by 4 to 0xa2d8 and Line by 4 to 415
  Special opcode 20: advance Address by 4 to 0xa2dc and Line by 1 to 416
  Special opcode 16: advance Address by 4 to 0xa2e0 and Line by -3 to 413
  Special opcode 17: advance Address by 4 to 0xa2e4 and Line by -2 to 411
  Special opcode 35: advance Address by 8 to 0xa2ec and Line by 2 to 413
  Special opcode 17: advance Address by 4 to 0xa2f0 and Line by -2 to 411
  Special opcode 26: advance Address by 4 to 0xa2f4 and Line by 7 to 418
  Special opcode 24: advance Address by 4 to 0xa2f8 and Line by 5 to 423
  Special opcode 20: advance Address by 4 to 0xa2fc and Line by 1 to 424
  Special opcode 21: advance Address by 4 to 0xa300 and Line by 2 to 426
  Special opcode 20: advance Address by 4 to 0xa304 and Line by 1 to 427
  Special opcode 158: advance Address by 44 to 0xa330 and Line by -1 to 426
  Special opcode 20: advance Address by 4 to 0xa334 and Line by 1 to 427
  Special opcode 23: advance Address by 4 to 0xa338 and Line by 4 to 431
  Special opcode 18: advance Address by 4 to 0xa33c and Line by -1 to 430
  Special opcode 17: advance Address by 4 to 0xa340 and Line by -2 to 428
  Special opcode 17: advance Address by 4 to 0xa344 and Line by -2 to 426
  Special opcode 35: advance Address by 8 to 0xa34c and Line by 2 to 428
  Special opcode 17: advance Address by 4 to 0xa350 and Line by -2 to 426
  Special opcode 26: advance Address by 4 to 0xa354 and Line by 7 to 433
  Special opcode 25: advance Address by 4 to 0xa358 and Line by 6 to 439
  Special opcode 21: advance Address by 4 to 0xa35c and Line by 2 to 441
  Special opcode 30: advance Address by 8 to 0xa364 and Line by -3 to 438
  Special opcode 24: advance Address by 4 to 0xa368 and Line by 5 to 443
  Special opcode 62: advance Address by 16 to 0xa378 and Line by 1 to 444
  Special opcode 116: advance Address by 32 to 0xa398 and Line by -1 to 443
  Special opcode 23: advance Address by 4 to 0xa39c and Line by 4 to 447
  Special opcode 20: advance Address by 4 to 0xa3a0 and Line by 1 to 448
  Special opcode 16: advance Address by 4 to 0xa3a4 and Line by -3 to 445
  Special opcode 17: advance Address by 4 to 0xa3a8 and Line by -2 to 443
  Special opcode 35: advance Address by 8 to 0xa3b0 and Line by 2 to 445
  Special opcode 17: advance Address by 4 to 0xa3b4 and Line by -2 to 443
  Special opcode 26: advance Address by 4 to 0xa3b8 and Line by 7 to 450
  Special opcode 25: advance Address by 4 to 0xa3bc and Line by 6 to 456
  Special opcode 21: advance Address by 4 to 0xa3c0 and Line by 2 to 458
  Special opcode 30: advance Address by 8 to 0xa3c8 and Line by -3 to 455
  Special opcode 24: advance Address by 4 to 0xa3cc and Line by 5 to 460
  Special opcode 20: advance Address by 4 to 0xa3d0 and Line by 1 to 461
  Special opcode 158: advance Address by 44 to 0xa3fc and Line by -1 to 460
  Special opcode 20: advance Address by 4 to 0xa400 and Line by 1 to 461
  Special opcode 23: advance Address by 4 to 0xa404 and Line by 4 to 465
  Special opcode 18: advance Address by 4 to 0xa408 and Line by -1 to 464
  Special opcode 17: advance Address by 4 to 0xa40c and Line by -2 to 462
  Special opcode 17: advance Address by 4 to 0xa410 and Line by -2 to 460
  Special opcode 35: advance Address by 8 to 0xa418 and Line by 2 to 462
  Special opcode 17: advance Address by 4 to 0xa41c and Line by -2 to 460
  Special opcode 26: advance Address by 4 to 0xa420 and Line by 7 to 467
  Special opcode 25: advance Address by 4 to 0xa424 and Line by 6 to 473
  Set File Name to entry 2 in the File Name Table
  Advance Line by -381 to 92
  Special opcode 33: advance Address by 8 to 0xa42c and Line by 0 to 92
  Special opcode 24: advance Address by 4 to 0xa430 and Line by 5 to 97
  Special opcode 119: advance Address by 32 to 0xa450 and Line by 2 to 99
  Special opcode 23: advance Address by 4 to 0xa454 and Line by 4 to 103
  Special opcode 122: advance Address by 32 to 0xa474 and Line by 5 to 108
  Special opcode 16: advance Address by 4 to 0xa478 and Line by -3 to 105
  Special opcode 22: advance Address by 4 to 0xa47c and Line by 3 to 108
  Advance Line by -16 to 92
  Special opcode 173: advance Address by 48 to 0xa4ac and Line by 0 to 92
  Set File Name to entry 1 in the File Name Table
  Advance Line by 383 to 475
  Special opcode 19: advance Address by 4 to 0xa4b0 and Line by 0 to 475
  Special opcode 23: advance Address by 4 to 0xa4b4 and Line by 4 to 479
  Set File Name to entry 2 in the File Name Table
  Advance Line by -360 to 119
  Special opcode 33: advance Address by 8 to 0xa4bc and Line by 0 to 119
  Special opcode 24: advance Address by 4 to 0xa4c0 and Line by 5 to 124
  Special opcode 119: advance Address by 32 to 0xa4e0 and Line by 2 to 126
  Special opcode 23: advance Address by 4 to 0xa4e4 and Line by 4 to 130
  Special opcode 122: advance Address by 32 to 0xa504 and Line by 5 to 135
  Special opcode 16: advance Address by 4 to 0xa508 and Line by -3 to 132
  Special opcode 22: advance Address by 4 to 0xa50c and Line by 3 to 135
  Advance Line by -16 to 119
  Special opcode 229: advance Address by 64 to 0xa54c and Line by 0 to 119
  Set File Name to entry 1 in the File Name Table
  Advance Line by 362 to 481
  Special opcode 19: advance Address by 4 to 0xa550 and Line by 0 to 481
  Advance Line by 21 to 502
  Special opcode 19: advance Address by 4 to 0xa554 and Line by 0 to 502
  Special opcode 94: advance Address by 24 to 0xa56c and Line by 5 to 507
  Special opcode 120: advance Address by 32 to 0xa58c and Line by 3 to 510
  Special opcode 50: advance Address by 12 to 0xa598 and Line by 3 to 513
  Advance Line by 9 to 522
  Special opcode 159: advance Address by 44 to 0xa5c4 and Line by 0 to 522
  Special opcode 18: advance Address by 4 to 0xa5c8 and Line by -1 to 521
  Special opcode 34: advance Address by 8 to 0xa5d0 and Line by 1 to 522
  Special opcode 18: advance Address by 4 to 0xa5d4 and Line by -1 to 521
  Special opcode 20: advance Address by 4 to 0xa5d8 and Line by 1 to 522
  Special opcode 18: advance Address by 4 to 0xa5dc and Line by -1 to 521
  Special opcode 20: advance Address by 4 to 0xa5e0 and Line by 1 to 522
  Special opcode 34: advance Address by 8 to 0xa5e8 and Line by 1 to 523
  Special opcode 49: advance Address by 12 to 0xa5f4 and Line by 2 to 525
  Special opcode 64: advance Address by 16 to 0xa604 and Line by 3 to 528
  Set File Name to entry 6 in the File Name Table
  Advance Line by -433 to 95
  Special opcode 89: advance Address by 24 to 0xa61c and Line by 0 to 95
  Set File Name to entry 8 in the File Name Table
  Advance Line by -79 to 16
  Special opcode 19: advance Address by 4 to 0xa620 and Line by 0 to 16
  Set File Name to entry 7 in the File Name Table
  Advance Line by 92 to 108
  Special opcode 19: advance Address by 4 to 0xa624 and Line by 0 to 108
  Set File Name to entry 4 in the File Name Table
  Advance Line by -57 to 51
  Special opcode 19: advance Address by 4 to 0xa628 and Line by 0 to 51
  Set File Name to entry 8 in the File Name Table
  Advance Line by -33 to 18
  Special opcode 33: advance Address by 8 to 0xa630 and Line by 0 to 18
  Set File Name to entry 7 in the File Name Table
  Advance Line by 90 to 108
  Special opcode 33: advance Address by 8 to 0xa638 and Line by 0 to 108
  Set File Name to entry 4 in the File Name Table
  Advance Line by -57 to 51
  Special opcode 19: advance Address by 4 to 0xa63c and Line by 0 to 51
  Set File Name to entry 1 in the File Name Table
  Advance Line by 484 to 535
  Special opcode 89: advance Address by 24 to 0xa654 and Line by 0 to 535
  Special opcode 21: advance Address by 4 to 0xa658 and Line by 2 to 537
  Set File Name to entry 6 in the File Name Table
  Advance Line by -442 to 95
  Special opcode 19: advance Address by 4 to 0xa65c and Line by 0 to 95
  Set File Name to entry 1 in the File Name Table
  Advance Line by 442 to 537
  Special opcode 19: advance Address by 4 to 0xa660 and Line by 0 to 537
  Set File Name to entry 7 in the File Name Table
  Advance Line by -429 to 108
  Special opcode 47: advance Address by 12 to 0xa66c and Line by 0 to 108
  Set File Name to entry 4 in the File Name Table
  Advance Line by -57 to 51
  Special opcode 19: advance Address by 4 to 0xa670 and Line by 0 to 51
  Set File Name to entry 1 in the File Name Table
  Advance Line by 496 to 547
  Special opcode 215: advance Address by 60 to 0xa6ac and Line by 0 to 547
  Special opcode 92: advance Address by 24 to 0xa6c4 and Line by 3 to 550
  Special opcode 66: advance Address by 16 to 0xa6d4 and Line by 5 to 555
  Special opcode 90: advance Address by 24 to 0xa6ec and Line by 1 to 556
  Set File Name to entry 6 in the File Name Table
  Advance Line by -461 to 95
  Special opcode 131: advance Address by 36 to 0xa710 and Line by 0 to 95
  Set File Name to entry 7 in the File Name Table
  Advance Line by 13 to 108
  Special opcode 19: advance Address by 4 to 0xa714 and Line by 0 to 108
  Set File Name to entry 4 in the File Name Table
  Advance Line by -57 to 51
  Special opcode 19: advance Address by 4 to 0xa718 and Line by 0 to 51
  Set File Name to entry 7 in the File Name Table
  Advance Line by 57 to 108
  Special opcode 33: advance Address by 8 to 0xa720 and Line by 0 to 108
  Set File Name to entry 4 in the File Name Table
  Advance Line by -57 to 51
  Special opcode 19: advance Address by 4 to 0xa724 and Line by 0 to 51
  Set File Name to entry 1 in the File Name Table
  Advance Line by 512 to 563
  Special opcode 89: advance Address by 24 to 0xa73c and Line by 0 to 563
  Special opcode 60: advance Address by 16 to 0xa74c and Line by -1 to 562
  Special opcode 20: advance Address by 4 to 0xa750 and Line by 1 to 563
  Advance PC by 20 to a764
  Extended opcode 1: End of Sequence

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-10-19  7:40     ` Gui,Jian
@ 2006-10-24 17:58       ` Roland McGrath
  2006-10-30  6:12         ` Gui,Jian
  0 siblings, 1 reply; 11+ messages in thread
From: Roland McGrath @ 2006-10-24 17:58 UTC (permalink / raw)
  To: Gui,Jian; +Cc: systemtap, Frank Ch. Eigler

> Is it a GCC bug? or is it the expected behavior considering GCC's
> optimizations? for ptrace_disable() is like:
> 
>      245 void ptrace_disable(struct task_struct *child)
>      246 {
>      247         /* make sure the single step bit is not set. */
>      248         clear_single_step(child);
>      249 }

It's likely you are just seeing the result of optimization.  If there is no
prologue for the function (likely), then there is no code at line 246.
clear_single_step is inlined, so there is no code at line 248 except for
what's inlined and so resolves to ptrace-common.h or to bitops.h where the
clear_tsk_thread_flag inline is defined.  

In the DWARF line information, each PC is resolved to one source location.
For inlines, this means the location of the inline's definition, and not
the source location where the inline is called.  So using only the line
info, you can't help this.

There should be a DW_TAG_inlined_subroutine containing this PC range.
That should have DW_AT_call_{file,line} attributes that say ptrace.c
line 248.  If the compiler is producing this info, then we could
potentially make systemtap use it.  The structure of DWARF information
unfortunately does not make this especially easy.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-10-24 17:58       ` Roland McGrath
@ 2006-10-30  6:12         ` Gui,Jian
  2006-10-30 22:07           ` Roland McGrath
  0 siblings, 1 reply; 11+ messages in thread
From: Gui,Jian @ 2006-10-30  6:12 UTC (permalink / raw)
  To: Roland McGrath; +Cc: systemtap, Frank Ch. Eigler

> There should be a DW_TAG_inlined_subroutine containing this PC range.
> That should have DW_AT_call_{file,line} attributes that say ptrace.c
> line 248.  If the compiler is producing this info, then we could
> potentially make systemtap use it.  The structure of DWARF information
> unfortunately does not make this especially easy.
> 
Thanks, Roland. From the debug_info of vmlinux:
  <1><4670f>: Abbrev Number: 47 (DW_TAG_subprogram)
      DW_AT_sibling     : <467d3>
      DW_AT_external    : 1
      DW_AT_name        : (indirect string, offset: 0x4aa5): 
ptrace_disable
      DW_AT_decl_file   : 1
      DW_AT_decl_line   : 246
      DW_AT_prototyped  : 1
      DW_AT_low_pc      : 0x9db0
      DW_AT_high_pc     : 0x9dec
      DW_AT_frame_base  : 1 byte block: 51       (DW_OP_reg1)
  <2><4672e>: Abbrev Number: 48 (DW_TAG_formal_parameter)
      DW_AT_name        : (indirect string, offset: 0x146c): child
      DW_AT_decl_file   : 1
      DW_AT_decl_line   : 245
      DW_AT_type        : <410d2>
      DW_AT_location    : 1 byte block: 53       (DW_OP_reg3)
  <2><4673b>: Abbrev Number: 49 (DW_TAG_inlined_subroutine)
      DW_AT_abstract_origin: <467d3>
      DW_AT_low_pc      : 0x9db0
      DW_AT_high_pc     : 0x9de8
      DW_AT_call_file   : 0
      DW_AT_call_line   : 0

Does this mean the compiler didn't produce such information and
we cannot handle this in systemtap?

Thanks.

-Guijian

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-10-30  6:12         ` Gui,Jian
@ 2006-10-30 22:07           ` Roland McGrath
  2006-11-01  7:03             ` Alexandre Oliva
  0 siblings, 1 reply; 11+ messages in thread
From: Roland McGrath @ 2006-10-30 22:07 UTC (permalink / raw)
  To: Gui,Jian; +Cc: systemtap, Frank Ch. Eigler

>   <2><4673b>: Abbrev Number: 49 (DW_TAG_inlined_subroutine)
>       DW_AT_abstract_origin: <467d3>
>       DW_AT_low_pc      : 0x9db0
>       DW_AT_high_pc     : 0x9de8
>       DW_AT_call_file   : 0
>       DW_AT_call_line   : 0
> 
> Does this mean the compiler didn't produce such information and
> we cannot handle this in systemtap?

This indeed is the compiler giving us no useful information here.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-10-30 22:07           ` Roland McGrath
@ 2006-11-01  7:03             ` Alexandre Oliva
  2006-11-01 12:32               ` Gui,Jian
  0 siblings, 1 reply; 11+ messages in thread
From: Alexandre Oliva @ 2006-11-01  7:03 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Gui,Jian, systemtap, Frank Ch. Eigler

On Oct 30, 2006, Roland McGrath <roland@redhat.com> wrote:

>> <2><4673b>: Abbrev Number: 49 (DW_TAG_inlined_subroutine)
>> DW_AT_abstract_origin: <467d3>
>> DW_AT_low_pc      : 0x9db0
>> DW_AT_high_pc     : 0x9de8
>> DW_AT_call_file   : 0
>> DW_AT_call_line   : 0
>> 
>> Does this mean the compiler didn't produce such information and
>> we cannot handle this in systemtap?

> This indeed is the compiler giving us no useful information here.

Indeed, but this is an inlined call of ptrace_disabled.  What we're
missing is info about the clear_single_step() inlined call.  However,
in my kernel source tree, clear_single_step is a macro, not a
function, so you won't get debug info for it without -g3 and, even
then, you may not get any line numbers whatsoever for the function
that does nothing but call a macro.

I'm going to need preprocessed sources, a compilation command line and
a compiler version number in order to try to get more detailed info
and fix the compiler bug, if there is one.

Ideally, such info should be in a Systemtap bug report at
sources.redhat.com or bugzilla.redhat.com.

Thanks,

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America        http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-11-01  7:03             ` Alexandre Oliva
@ 2006-11-01 12:32               ` Gui,Jian
  2006-11-07  7:52                 ` Alexandre Oliva
  0 siblings, 1 reply; 11+ messages in thread
From: Gui,Jian @ 2006-11-01 12:32 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Roland McGrath, systemtap, Frank Ch. Eigler

Alexandre Oliva wrote:
> Indeed, but this is an inlined call of ptrace_disabled.  What we're
> missing is info about the clear_single_step() inlined call.  However,
> in my kernel source tree, clear_single_step is a macro, not a
> function, so you won't get debug info for it without -g3 and, even
> then, you may not get any line numbers whatsoever for the function
> that does nothing but call a macro.
In 2.6.18.1, clear_single_step is defined as an inlined call in
arch/powerpc/kernel/ptrace.c (ppc64) or
arch/powerpc/kernel/ptrace.c (ppc32). Although it is also defined
as macro in arch/powerpc/kernel/traps.c, I think ptrace_disable is
using its inlined call definition.

> 
> I'm going to need preprocessed sources, a compilation command line and
> a compiler version number in order to try to get more detailed info
> and fix the compiler bug, if there is one.
> 
> Ideally, such info should be in a Systemtap bug report at
> sources.redhat.com or bugzilla.redhat.com.
> 
Thanks. I've opened bug 3441 for this and attached some data.
http://sourceware.org/bugzilla/show_bug.cgi?id=3441

Please let me know if more info is needed.

-Guijian

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-11-01 12:32               ` Gui,Jian
@ 2006-11-07  7:52                 ` Alexandre Oliva
  2006-11-07 14:34                   ` Gui,Jian
  0 siblings, 1 reply; 11+ messages in thread
From: Alexandre Oliva @ 2006-11-07  7:52 UTC (permalink / raw)
  To: Gui,Jian, jakub; +Cc: Roland McGrath, systemtap, Frank Ch. Eigler

[-- Attachment #1: Type: text/plain, Size: 1768 bytes --]

On Nov  1, 2006, "Gui,Jian" <guij@cn.ibm.com> wrote:

> Alexandre Oliva wrote:
>> Indeed, but this is an inlined call of ptrace_disabled.  What we're
>> missing is info about the clear_single_step() inlined call.  However,
>> in my kernel source tree, clear_single_step is a macro, not a
>> function, so you won't get debug info for it without -g3 and, even
>> then, you may not get any line numbers whatsoever for the function
>> that does nothing but call a macro.
> In 2.6.18.1, clear_single_step is defined as an inlined call in
> arch/powerpc/kernel/ptrace.c (ppc64) or
> arch/powerpc/kernel/ptrace.c (ppc32). Although it is also defined
> as macro in arch/powerpc/kernel/traps.c, I think ptrace_disable is
> using its inlined call definition.

> Thanks. I've opened bug 3441 for this and attached some data.
> http://sourceware.org/bugzilla/show_bug.cgi?id=3441

> Please let me know if more info is needed.

Thanks, I've located the problem.  I missed a hunk when backporting
the patch that was meant to add this debug info; one of the hunks in
the original patch translated to two identical changes elsewhere, and
the second hunk in the same file had to be applied to a completely
different piece of code that I didn't recognize back then.  As a
result, we ended up without the desired info in many cases.  The patch
below is a fix, that brings in the last hunk in the patch to
tree-inline.c in the GCC trunk that generated revision 102379.

Jakub, do you want a patch for the patch file, or is this good enough?
I guess we need a bug report in Red Hat's bugzilla to get a fix into
some RHEL 4 update, right?

Gui,Jian, do you want to file the bug report at
bugzilla.redhat.com/bugzilla yourself, to keep track of it, or would
you like us to take care of it?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gcc34-dwarf2-inline-details-fix.patch --]
[-- Type: text/x-patch, Size: 1229 bytes --]

This patch fixes a change that went missing in the
gcc34-dwarf2-inline-details.patch backport.

for gcc/ChangeLog
2006-11-07  Alexandre Oliva  <aoliva@redhat.com>

	* tree-inline.c (expand_call_inline): Set BLOCK_SOURCE_LOCATION.

Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c.orig	2006-10-13 04:31:24.000000000 -0300
+++ gcc/tree-inline.c	2006-11-07 04:06:10.000000000 -0200
@@ -1253,6 +1253,7 @@ expand_call_inline (tree *tp, int *walk_
   tree args;
   tree return_slot_addr;
   const char *reason;
+  location_t incoming_loc = input_location;
 
   /* See what we've got.  */
   id = (inline_data *) data;
@@ -1464,7 +1465,10 @@ expand_call_inline (tree *tp, int *walk_
   /* Tell the debugging backends that this block represents the
      outermost scope of the inlined function.  */
   if (SCOPE_STMT_BLOCK (scope_stmt))
-    BLOCK_ABSTRACT_ORIGIN (SCOPE_STMT_BLOCK (scope_stmt)) = DECL_ORIGIN (fn);
+    {
+      BLOCK_ABSTRACT_ORIGIN (SCOPE_STMT_BLOCK (scope_stmt)) = DECL_ORIGIN (fn);
+      BLOCK_SOURCE_LOCATION (SCOPE_STMT_BLOCK (scope_stmt)) = incoming_loc;
+    }
 
   /* Declare the return variable for the function.  */
   COMPOUND_BODY (stmt)

[-- Attachment #3: Type: text/plain, Size: 249 bytes --]


-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: "no match" semantic error for some existing probe points
  2006-11-07  7:52                 ` Alexandre Oliva
@ 2006-11-07 14:34                   ` Gui,Jian
  0 siblings, 0 replies; 11+ messages in thread
From: Gui,Jian @ 2006-11-07 14:34 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: jakub, Roland McGrath, systemtap, Frank Ch. Eigler

Alexandre Oliva 写道:
> Gui,Jian, do you want to file the bug report at
> bugzilla.redhat.com/bugzilla yourself, to keep track of it, or would
> you like us to take care of it?
> 
Thanks. I opened a new bug at RedHat bugzilla for this:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214353

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-11-07  7:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-17 10:17 "no match" semantic error for some existing probe points Gui,Jian
2006-10-17 20:55 ` Frank Ch. Eigler
2006-10-18  4:00   ` Gui,Jian
2006-10-19  7:40     ` Gui,Jian
2006-10-24 17:58       ` Roland McGrath
2006-10-30  6:12         ` Gui,Jian
2006-10-30 22:07           ` Roland McGrath
2006-11-01  7:03             ` Alexandre Oliva
2006-11-01 12:32               ` Gui,Jian
2006-11-07  7:52                 ` Alexandre Oliva
2006-11-07 14:34                   ` Gui,Jian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).