From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754706AbaIPR6l (ORCPT ); Tue, 16 Sep 2014 13:58:41 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:45978 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751013AbaIPR6j (ORCPT ); Tue, 16 Sep 2014 13:58:39 -0400 Date: Tue, 16 Sep 2014 19:58:34 +0200 From: Ingo Molnar To: Pawel Moll Cc: David Ahern , Arnaldo Carvalho de Melo , Richard Cochran , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Paul Mackerras , John Stultz , "linux-kernel@vger.kernel.org" , "linux-api@vger.kernel.org" Subject: Re: [RFC 2/2] perf: Marker software event and ioctl Message-ID: <20140916175834.GA13970@gmail.com> References: <1410522513-1045-1-git-send-email-pawel.moll@arm.com> <1410522513-1045-3-git-send-email-pawel.moll@arm.com> <54132F63.1010401@gmail.com> <20140912204444.GA11199@kernel.org> <5415B790.5010607@gmail.com> <20140916074421.GA21295@gmail.com> <1410885463.12376.24.camel@hornet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1410885463.12376.24.camel@hornet> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Pawel Moll wrote: > On Tue, 2014-09-16 at 08:44 +0100, Ingo Molnar wrote: > > I think adding an ioctl to inject user-provided data into the > > event stream is sensible, as long as there's a separate 'user > > generated data' event for it, etc. > > > > The main usecase I could see would be to introduce a > > perf_printf() variant, supported by 'perf trace' by default, to > > add various tracable printouts to apps. > > > > Timestamps generated by apps would be another usecase. It would > > probably be wise to add a 32-bit (or 64-bit) message type ID, > > plus a length field, with a message type registry somewhere in > > tools/perf/ (and reference implementation for each new subtype), > > to keep things organized yet flexible going forward. > > Right, so this is pretty much what I got talking to Arnaldo... > > > { u64 type; /* 0 means zero-terminated string in data */ > > u32 size; > > char data[size]; } && PERF_SAMPLE_MARKER > > ... with one type - 0 - defined as a "universal" string (so any > possible tool knows what to do about it), the rest being left > to userspace (this "registry" you mention). > > Before I proceed any further, is the term "marker" acceptable? > Maybe a "printf" instead? Or a "log"? As we know naming is > often single most discussed subject when it comes to new things > in the kernel ;-) Well, it's a user-space generated trace/event entry, so lets call it that? Thanks, Ingo