From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21443 invoked by alias); 22 Aug 2010 15:17:00 -0000 Received: (qmail 21433 invoked by uid 22791); 22 Aug 2010 15:16:58 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Aug 2010 15:16:52 +0000 Received: by wyg36 with SMTP id 36so6341146wyg.0 for ; Sun, 22 Aug 2010 08:16:49 -0700 (PDT) Received: by 10.216.175.12 with SMTP id y12mr1474446wel.61.1282490209215; Sun, 22 Aug 2010 08:16:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.186.205 with HTTP; Sun, 22 Aug 2010 08:16:29 -0700 (PDT) From: Hui Zhu Date: Sun, 22 Aug 2010 15:17:00 -0000 Message-ID: Subject: Linux Kernel GDB tracepoint module support most collect now To: "gdb@sourceware.org" , linux-kernel@vger.kernel.org Cc: Michael Snyder , Marc Khouzam , Thiago Jung Bauermann Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00133.txt.bz2 Linux Kernel GDB tracepoint module support action X and all agent expression except the trace state variable codes. So KGTP can support a lot of collect command of tracepoint in x86-64 and x86-32. To get the new KGTP please goto http://code.google.com/p/kgtp/downloads/list To get more message about GDB tracepoint please goto http://sourceware.org/gdb/current/onlinedocs/gdb/Tracepoints.html For example: make sudo insmod gtp.ko sudo gdb ./vmlinux (gdb) trace vfs_readdir Tracepoint 1 at 0xffffffff8113f7fc: file /home/teawater/kernel/linux-2.6/fs/readdir.c, line 24. (gdb) actions Enter actions for tracepoint 1, one per line. End with a line saying just "end". >collect *(unsigned char *)$rsp@512 >collect *file >end (gdb) target remote /proc/gtp Remote debugging using /proc/gtp 0x0000000000000000 in ?? () (gdb) tstart (gdb) shell ls 2 block firmware i ipc Makefile modules.order scripts source t~ vmlinux a.out crypto fs include kernel mm Module.symvers security System.map usr vmlinux.o arch drivers gdb.txt init lib modules.builtin net sound t virt (gdb) tstop (gdb) tfind Found trace frame 0, tracepoint 1 #0 0xffffffff8113f7fd in vfs_readdir (file=0xffff880075f00780, filler=0xffffffff8113f630 , buf=0xffff880005785f38) at /home/teawater/kernel/linux-2.6/fs/readdir.c:24 24 { (gdb) bt #0 0xffffffff8113f7fd in vfs_readdir (file=0xffff880075f00780, filler=0xffffffff8113f630 , buf=0xffff880005785f38) at /home/teawater/kernel/linux-2.6/fs/readdir.c:24 #1 0xffffffff8113fa14 in sys_getdents (fd=, dirent=0x801108, count=32768) at /home/teawater/kernel/linux-2.6/fs/readdir.c:214 #2 0xffffffff8100af42 in ?? () at /home/teawater/kernel/linux-2.6/arch/x86/kernel/entry_64.S:487 #3 0x00007f3249a81765 in ?? () #4 0x00000018555503f7 in ?? () #5 0x0000015400000000 in ?? () #6 0x0000000000bf5048 in ?? () #7 0x0000000000000000 in ?? () (gdb) p file $1 = (struct file *) 0xffff880075f00780 (gdb) p *file $2 = {f_u = {fu_list = {next = 0xffff880075f00480, prev = 0xffffe8ffffc06948}, fu_rcuhead = {next = 0xffff880075f00480, func = 0xffffe8ffffc06948}}, f_path = {mnt = 0xffff880037d92e00, dentry = 0xffff8800353239c0}, f_op = 0xffffffff81622a60, f_lock = {{ rlock = {raw_lock = {slock = 0}}}}, f_sb_list_cpu = 0, f_count = {counter = 2}, f_flags = 624640, f_mode = 29, f_pos = 0, f_owner = { lock = {raw_lock = {lock = 16777216}}, pid = 0x0, pid_type = PIDTYPE_PID, uid = 0, euid = 0, signum = 0}, f_cred = 0xffff880079b40a80, f_ra = {start = 0, size = 0, async_size = 0, ra_pages = 32, mmap_miss = 0, prev_pos = -1}, f_version = 0, f_security = 0x0, private_data = 0x0, f_ep_links = {next = 0xffff880075f00828, prev = 0xffff880075f00828}, f_mapping = 0xffff88003539d6b8} (gdb) tfind Found trace frame 1, tracepoint 1 0xffffffff8113f7fd 24 { (gdb) bt #0 0xffffffff8113f7fd in vfs_readdir (file=0xffff880075f00780, filler=0xffffffff8113f630 , buf=0xffff880005785f38) at /home/teawater/kernel/linux-2.6/fs/readdir.c:24 #1 0xffffffff8113fa14 in sys_getdents (fd=, dirent=0x801108, count=32768) at /home/teawater/kernel/linux-2.6/fs/readdir.c:214 #2 0xffffffff8100af42 in ?? () at /home/teawater/kernel/linux-2.6/arch/x86/kernel/entry_64.S:487 #3 0x00007f3249a81765 in ?? () #4 0x00000018555503f7 in ?? () #5 0x0000015400000000 in ?? () #6 0x0000000000bf5048 in ?? () #7 0x0000000000000000 in ?? () (gdb) p *file $3 = {f_u = {fu_list = {next = 0xffff880075f00480, prev = 0xffffe8ffffc06948}, fu_rcuhead = {next = 0xffff880075f00480, func = 0xffffe8ffffc06948}}, f_path = {mnt = 0xffff880037d92e00, dentry = 0xffff8800353239c0}, f_op = 0xffffffff81622a60, f_lock = {{ rlock = {raw_lock = {slock = 0}}}}, f_sb_list_cpu = 0, f_count = {counter = 2}, f_flags = 624640, f_mode = 29, f_pos = 2147483647, f_owner = {lock = {raw_lock = {lock = 16777216}}, pid = 0x0, pid_type = PIDTYPE_PID, uid = 0, euid = 0, signum = 0}, f_cred = 0xffff880079b40a80, f_ra = {start = 0, size = 0, async_size = 0, ra_pages = 32, mmap_miss = 0, prev_pos = -1}, f_version = 16, f_security = 0x0, private_data = 0xffff8800755d5600, f_ep_links = {next = 0xffff880075f00828, prev = 0xffff880075f00828}, f_mapping = 0xffff88003539d6b8}