From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16246 invoked by alias); 16 Nov 2007 20:10:24 -0000 Received: (qmail 16235 invoked by uid 22791); 16 Nov 2007 20:10:22 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,TW_EB X-Spam-Check-By: sourceware.org Received: from tomts10.bellnexxia.net (HELO tomts10-srv.bellnexxia.net) (209.226.175.54) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 20:10:18 +0000 Received: from toip7.srvr.bell.ca ([209.226.175.124]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071116201016.IMWQ1733.tomts10-srv.bellnexxia.net@toip7.srvr.bell.ca> for ; Fri, 16 Nov 2007 15:10:16 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAKuHPUdMROHU/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 15:10:49 -0500 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by krystal.dyndns.org with local; Fri, 16 Nov 2007 15:10:15 -0500 id 001CE3B0.473DF927.00007824 Date: Fri, 16 Nov 2007 20:10:00 -0000 From: Mathieu Desnoyers To: "Frank Ch. Eigler" Cc: David Smith , ltt-dev@shafik.org, Systemtap List Subject: Re: patches to actually use markers? Message-ID: <20071116201015.GA29545@Krystal> References: <472633E3.1050507@redhat.com> <20071029220454.GB4233@Krystal> <4728AD5F.1010604@redhat.com> <473DEBB7.40607@redhat.com> <20071116192415.GA25794@Krystal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: X-Editor: vi X-Info: http://krystal.dyndns.org:8080 X-Operating-System: Linux/2.6.21.3-grsec (i686) X-Uptime: 15:07:30 up 13 days, 1:12, 6 users, load average: 0.95, 0.60, 0.58 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/msg00354.txt.bz2 * Frank Ch. Eigler (fche@redhat.com) wrote: > Mathieu Desnoyers writes: > > > [...] > >> trace_mark(kernel_arch_syscall_entry, "syscall_id %d ip #p%ld", > >> (int)regs->orig_eax, instruction_pointer(regs)); > >> [...] > >> For systemtap use, we'd like to have more information than that. On > >> syscall entry, we'd like be able to get the arguments, [...] > > > > 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. > > How would this syscall specific function get ebx or the string, > without ebx (or regs) being passed as marker arguments? > That's the idea : in the syscall specific function (not in syscall_trace()), we add another marker that takes the syscall specific arguments as parameter. I think we use the same approach there. What I was saying is that we can't extract the string from syscall_trace() because we have no idea it is a string. > For systemtap's purposes, we're prepared to have per-systemcall logic > to decode arguments further, in particular to extract user-space > strings. But we need to know where to look for them! > > > > You have a good point for the syscall exit instrumentation : adding the > > return value is trivial and would be very useful. > > (And an errno code if it's separate.) > AFAIK, the errno code is generated by the userspace libraries using the return value of the syscall, so it would be the same. Mathieu > > - FChE -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68