Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754476AbbBNWyl (ORCPT ); Sat, 14 Feb 2015 17:54:41 -0500 Received: from mail-qc0-f178.google.com ([209.85.216.178]:53537 "EHLO mail-qc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754252AbbBNWyj (ORCPT ); Sat, 14 Feb 2015 17:54:39 -0500 MIME-Version: 1.0 From: Alexei Starovoitov Date: Sat, 14 Feb 2015 17:54:18 -0500 Message-ID: Subject: Re: [PATCH v3 linux-trace 1/8] tracing: attach eBPF programs to tracepoints and syscalls To: Steven Rostedt Cc: Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Masami Hiramatsu , Linux API , Network Development , LKML , Linus Torvalds , Peter Zijlstra , "Eric W. Biederman" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1977 Lines: 48 On Wed, Feb 11, 2015 at 7:51 AM, Steven Rostedt wrote: > On Tue, 10 Feb 2015 22:33:05 -0800 > Alexei Starovoitov wrote: > > >> fair enough. >> Something like TRACE_MARKER(arg1, arg2) that prints >> it was hit without accessing the args would be enough. >> Without any args it is indeed a 'fast kprobe' only. >> Debug info would still be needed to access >> function arguments. >> On x64 function entry point and x64 abi make it easy >> to access args, but i386 or kprobe in the middle >> lose visibility when debug info is not available. >> TRACE_MARKER (with few key args that function >> is operating on) is enough to achieve roughly the same >> as kprobe without debug info. > > Actually, what about a TRACE_EVENT_DEBUG(), that has a few args and > possibly a full trace event layout. > > The difference would be that the trace events do not show up unless you > have "trace_debug" on the command line. This should prevent > applications from depending on them. > > I could even do the nasty dmesg output like I do with trace_printk()s, > that would definitely keep a production kernel from adding it by > default. > > When trace_debug is not there, the trace points could still be accessed > but perhaps only via bpf, or act like a simple trace marker. I think that is a great idea! Makes it clear that all prints are for debugging and no abi guarantees. > Note, if you need ids, I rather have them in another directory than > tracefs. Make a eventfs perhaps that holds these. I rather keep tracefs > simple. indeed. makes sense. no reason to burn fs memory just to get an id from name. may be perf_event api can be extended to lookup id from name. I think perf will benefit as well. -- 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/