Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 22 Sep 2002 18:36:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 22 Sep 2002 18:36:39 -0400 Received: from mx1.elte.hu ([157.181.1.137]:19360 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Sun, 22 Sep 2002 18:36:38 -0400 Date: Mon, 23 Sep 2002 00:50:04 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: Karim Yaghmour Cc: Linus Torvalds , Roman Zippel , linux-kernel , LTT-Dev Subject: Re: [PATCH] LTT for 2.5.38 1/9: Core infrastructure In-Reply-To: <3D8E3FA9.7389A61F@opersys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1275 Lines: 31 a number of suggestions to make the tracer truly lightweight: - remove the 'event registration' and callback stuff. It just introduces unnecessery runtime overhead. Use an include file as a registry of events instead. This will simplify things greatly. Why do you need a table of callbacks registered to an event? Nothing in your patches actually uses it ... Just use one tracing function that copies the arguments into a per-CPU ringbuffer. It's really just a few lines. - do not disable interrupts when writing events. I used this method in a tracer and it works well. Just get an irq-safe index to the trace ring-buffer and fill it in. [eg. on x86 incl can be used for this purpose.] - get rid of p->trace_info and the pending_write_count - it's completely unnecessery. - drivers/trace/tracer.c is a complex mess of strange coding style and #ifdefs, it's not proper Linux kernel code. it's possible to have lightweight tracing - this patch clearly is not achieving that goal yet. Ingo - 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/