From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752997AbbC3JRt (ORCPT ); Mon, 30 Mar 2015 05:17:49 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50566 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752679AbbC3JRr (ORCPT ); Mon, 30 Mar 2015 05:17:47 -0400 Date: Mon, 30 Mar 2015 11:17:35 +0200 From: Peter Zijlstra To: Stephane Eranian Cc: Arnaldo Carvalho de Melo , David Ahern , Thomas Gleixner , Jiri Olsa , Linus Torvalds , LKML , John Stultz , "H. Peter Anvin" , Andrew Morton , Ingo Molnar Subject: Re: [PATCH] perf, record: Add clockid parameter Message-ID: <20150330091735.GK24151@twins.programming.kicks-ass.net> References: <20150327143201.GG21418@twins.programming.kicks-ass.net> <55158F25.9040100@gmail.com> <20150327172059.GK23123@twins.programming.kicks-ass.net> <551594DD.7050705@gmail.com> <20150327201534.GD6291@redhat.com> <20150327215942.GL23123@twins.programming.kicks-ass.net> <20150328075549.GG27490@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150328075549.GG27490@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 28, 2015 at 08:55:49AM +0100, Peter Zijlstra wrote: > +static const struct clockid_map clockids[] = { > + /* available for all events, NMI safe */ > + CLOCKID_MAP("monotonic", CLOCK_MONOTONIC), > + CLOCKID_MAP("monotonic_raw", CLOCK_MONOTONIC_RAW), > + CLOCKID_MAP("raw", CLOCK_MONOTONIC_RAW), > + > + /* available for some events */ > + CLOCKID_MAP("realtime", CLOCK_REALTIME), > + CLOCKID_MAP("boottime", CLOCK_BOOTTIME), > + CLOCKID_MAP("tai", CLOCK_TAI), > + > + CLOCKID_END, > +}; I did this on top.. --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -732,13 +732,16 @@ static const struct clockid_map clockids /* available for all events, NMI safe */ CLOCKID_MAP("monotonic", CLOCK_MONOTONIC), CLOCKID_MAP("monotonic_raw", CLOCK_MONOTONIC_RAW), - CLOCKID_MAP("raw", CLOCK_MONOTONIC_RAW), /* available for some events */ CLOCKID_MAP("realtime", CLOCK_REALTIME), CLOCKID_MAP("boottime", CLOCK_BOOTTIME), CLOCKID_MAP("tai", CLOCK_TAI), + /* available for the lazy */ + CLOCKID_MAP("mono", CLOCK_MONOTONIC), + CLOCKID_MAP("raw", CLOCK_MONOTONIC_RAW), + CLOCKID_END, };