Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753036AbbBSRYT (ORCPT ); Thu, 19 Feb 2015 12:24:19 -0500 Received: from mail-ig0-f175.google.com ([209.85.213.175]:61876 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751744AbbBSRYR (ORCPT ); Thu, 19 Feb 2015 12:24:17 -0500 MIME-Version: 1.0 In-Reply-To: <1424347870-8492-1-git-send-email-adrian.hunter@intel.com> References: <1424347870-8492-1-git-send-email-adrian.hunter@intel.com> Date: Thu, 19 Feb 2015 09:24:17 -0800 Message-ID: Subject: Re: [PATCH 0/2] perf/x86: Add ability to sample TSC From: John Stultz To: Adrian Hunter Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , lkml , David Ahern , Frederic Weisbecker , Jiri Olsa , Namhyung Kim , Paul Mackerras , Stephane Eranian , Thomas Gleixner , Pawel Moll , Steven Rostedt , Andi Kleen 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: 1060 Lines: 28 On Thu, Feb 19, 2015 at 4:11 AM, Adrian Hunter wrote: > Hi > > With the advent of switching perf_clock to CLOCK_MONOTONIC, > it will not be possible to convert perf_clock directly to/from > TSC. So add the ability to sample TSC instead. > > > Adrian Hunter (2): > perf: Sample additional clock value > perf/x86: Provide TSC for PERF_SAMPLE_CLOCK_ARCH This doesn't seem very portable. The CLOCK_MONOTONIC_RAW clockid was added to provide a arch-neutral abstraction of a free-running hardware counter that isn't affected by adjtimex slewing (though like any counter, it will be affected by non-constant drift). You might consider looking at that if the short term slew adjustments (which result in more accurate timings in the long term) are problematic for you. thanks -john -- 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/