From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754558AbbC0RAG (ORCPT ); Fri, 27 Mar 2015 13:00:06 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:35412 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754538AbbC0RAB (ORCPT ); Fri, 27 Mar 2015 13:00:01 -0400 MIME-Version: 1.0 In-Reply-To: <20150327165739.GJ23123@twins.programming.kicks-ass.net> References: <20150327163547.GI23123@twins.programming.kicks-ass.net> <20150327165739.GJ23123@twins.programming.kicks-ass.net> Date: Fri, 27 Mar 2015 10:00:00 -0700 Message-ID: Subject: Re: [tip:perf/timer] perf: Add per event clockid support From: Stephane Eranian To: Peter Zijlstra Cc: Thomas Gleixner , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , LKML , John Stultz , "H. Peter Anvin" , David Ahern , Andrew Morton , Ingo Molnar Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 27, 2015 at 9:57 AM, Peter Zijlstra wrote: > On Fri, Mar 27, 2015 at 09:52:25AM -0700, Stephane Eranian wrote: >> Ok, I see. But on architectures which do not have NMI, they would all >> be safe. And that would work if they set the PERF_PMU_CAP_NO_NMI flag >> on their pmu->capabilities. > > Indeed so. I have not audited them all as the current 'default' is safe. > >> Next, I am trying to understand how perf is going to expose this. I am >> thinking about this in the context of my jitted code patches. > > I send you some preliminary patches for this. > >> With this approach, the jit runtime and the perf tool need to agree on >> the clock they are using. That mean they need to advertise or document >> the clock they use > > This is indeed still missing, I put an XXX question in one of the > emails to this effect. I suppose we should store the used clockid in the > data file. I just haven't figured out how all that code works. > >> and there needs to be an option in perf record to pass that same >> clockid. > > I did indeed post a patch to do that. I will switch my jitted patches to your approach to verify that this actually works. Thanks.