Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934088AbZKXV0P (ORCPT ); Tue, 24 Nov 2009 16:26:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933497AbZKXV0O (ORCPT ); Tue, 24 Nov 2009 16:26:14 -0500 Received: from one.firstfloor.org ([213.235.205.2]:38784 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933487AbZKXV0N (ORCPT ); Tue, 24 Nov 2009 16:26:13 -0500 Date: Tue, 24 Nov 2009 22:26:19 +0100 From: Andi Kleen To: Oleg Nesterov Cc: Andi Kleen , Alexey Dobriyan , Ananth Mavinakayanahalli , Christoph Hellwig , "Frank Ch. Eigler" , Ingo@firstfloor.org, "Molnar References: <20091124200220.GA5828@redhat.com> <87my2bwtno.fsf@basil.nowhere.org> <20091124204152.GA9131@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091124204152.GA9131@redhat.com> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1921 Lines: 56 On Tue, Nov 24, 2009 at 09:41:52PM +0100, Oleg Nesterov wrote: > On 11/24, Andi Kleen wrote: > > > > Oleg Nesterov writes: > > > > > From: Roland McGrath > > > > > > This adds the utrace facility, a new modular interface in the kernel > > > for implementing user thread tracing and debugging. This fits on top > > > of the tracehook_* layer, so the new code is well-isolated. > > > > Could we just drop the tracehook layer if this finally merged > > and call the low level functions directly? > > Not sure I understand. Tracehooks are trivial inline wrappers on > top utrace calls, Yes that's the problem -- they are unnecessary obfuscation when you can just call directly. > > > It might have been reasonably early on when it was still out of tree, > > but longer term when it's integrated having strange opaque hooks > > like that just makes the coder harder to read and maintain. > > Well, I don't think the code will be better if we remove tracehooks. > > For example. tracehook_report_syscall_entry() has a lot of callers > in arch/, each callsite should be changed to do > > if ((task_utrace_flags(current) & UTRACE_EVENT(SYSCALL_ENTRY)) && > utrace_report_syscall_entry(regs)) > ret = -1; // this depends on machine > > instead of simply calling tracehook_report_syscall_entry(). That should be in the utrace code? I don't have a problem with having common code somewhere, just not a whole layer whose only purpose seems to be obfuscation. > What is the point? Less code obfuscation. When it's a utrace call, call it a utrace call, not something else. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/