From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22002 invoked by alias); 16 Nov 2007 19:24:25 -0000 Received: (qmail 21990 invoked by uid 22791); 16 Nov 2007 19:24:24 -0000 X-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,TW_EB X-Spam-Check-By: sourceware.org Received: from tomts43-srv.bellnexxia.net (HELO tomts43-srv.bellnexxia.net) (209.226.175.110) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 19:24:19 +0000 Received: from toip7.srvr.bell.ca ([209.226.175.124]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071116192416.LPAT26794.tomts43-srv.bellnexxia.net@toip7.srvr.bell.ca> for ; Fri, 16 Nov 2007 14:24:16 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAKd8PUdMROHU/2dsb2JhbACBXw Received: from bas5-montreal19-1279582676.dsl.bell.ca (HELO krystal.dyndns.org) ([76.68.225.212]) by toip7.srvr.bell.ca with ESMTP; 16 Nov 2007 14:24:50 -0500 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by krystal.dyndns.org with local; Fri, 16 Nov 2007 14:24:16 -0500 id 001CE3D1.473DEE60.000070AB Date: Fri, 16 Nov 2007 19:24:00 -0000 From: Mathieu Desnoyers To: David Smith Cc: ltt-dev@shafik.org, Systemtap List Subject: Re: patches to actually use markers? Message-ID: <20071116192415.GA25794@Krystal> References: <472633E3.1050507@redhat.com> <20071029220454.GB4233@Krystal> <4728AD5F.1010604@redhat.com> <473DEBB7.40607@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <473DEBB7.40607@redhat.com> X-Editor: vi X-Info: http://krystal.dyndns.org:8080 X-Operating-System: Linux/2.6.21.3-grsec (i686) X-Uptime: 14:22:05 up 13 days, 27 min, 6 users, load average: 1.15, 1.06, 1.21 User-Agent: Mutt/1.5.16 (2007-06-11) X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00352.txt.bz2 * David Smith (dsmith@redhat.com) wrote: > David Smith wrote: > > Mathieu Desnoyers wrote: > >> * David Smith (dsmith@redhat.com) wrote: > >>> Mathieu, > >>> > >>> Now that the markers facility itself has made it in the kernel, do > >>> you have plans on trying to send patches that actually use markers to > >>> lkml? > >>> > >>> For systemtap's use, we'd like to get some actual markers in the > >>> upstream kernel. Off the top of my head, we might start with adding > >>> markers to system calls (sys_*) that contain the system call's > >>> argument(s). > >>> > >> > >> Hi David, > >> > >> Yes, we have something similar in LTTng, we instrument many widely used > >> system calls to get the detailed arguments. > > ... > > >> It's a good thing that we start having a discussion about these marker > >> sites at this point. > >> > >> Mathieu > > I've been looking at your system call tracing patches. (I've tried > running lttv itself without much luck, but it doesn't really matter for > the sake of this discussion.) > > I like the way you use the existing system call tracing points. So > we're on the same page, here are the markers I'm seeing in > arch/x86/kernel/ptrace32.c after applying > patch-2.6.24-rc2-lttng-0.10-pre23.tar.bz2: > > trace_mark(kernel_arch_syscall_entry, "syscall_id %d ip #p%ld", > (int)regs->orig_eax, instruction_pointer(regs)); > > trace_mark(kernel_arch_syscall_exit, MARK_NOARGS); > > For systemtap use, we'd like to have more information than that. On > syscall entry, we'd like be able to get the arguments, On syscall exit, > we'd like the to be able to get the return value. In fact, the easiest > thing would be to supply the same information that audit_syscall_entry() > and audit_syscall_exit() need. > > Since I'll bet you've already considered this, I'd like to know why you > decided to go a different way. > Well, the approach taken was to instrument each important system call in the syscall specific function to be able to actually know what type of information to record. For instance, if ebx points to a string, the pointer is not very useful, but the string is. You have a good point for the syscall exit instrumentation : adding the return value is trivial and would be very useful. Could we do better ? > Thanks. > > -- > David Smith > dsmith@redhat.com > Red Hat > http://www.redhat.com > 256.217.0141 (direct) > 256.837.0057 (fax) -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68