Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964940AbbBBQxF (ORCPT ); Mon, 2 Feb 2015 11:53:05 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:40701 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S964775AbbBBQxC (ORCPT ); Mon, 2 Feb 2015 11:53:02 -0500 Message-ID: <1422895966.4944.25.camel@arm.com> Subject: Re: [PATCH v5] perf: Use monotonic clock as a source for timestamps From: Pawel Moll To: Peter Zijlstra Cc: Richard Cochran , Steven Rostedt , Ingo Molnar , Paul Mackerras , Arnaldo Carvalho de Melo , John Stultz , Masami Hiramatsu , Christopher Covington , Namhyung Kim , David Ahern , Thomas Gleixner , Tomeu Vizoso , "linux-kernel@vger.kernel.org" , "linux-api@vger.kernel.org" Date: Mon, 02 Feb 2015 16:52:46 +0000 In-Reply-To: <1421872037-12559-1-git-send-email-pawel.moll@arm.com> References: <1415292718-19785-2-git-send-email-pawel.moll@arm.com> <1421872037-12559-1-git-send-email-pawel.moll@arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1610 Lines: 38 Afternoon, Peter, On Wed, 2015-01-21 at 20:27 +0000, Pawel Moll wrote: > Until now, perf framework never defined the meaning of the timestamps > captured as PERF_SAMPLE_TIME sample type. The values were obtaining > from local (sched) clock, which is unavailable in userspace. This made > it impossible to correlate perf data with any other events. Other > tracing solutions have the source configurable (ftrace) or just share > a common time domain between kernel and userspace (LTTng). > > Follow the trend by using monotonic clock, which is readily available > as POSIX CLOCK_MONOTONIC. > > Also add a sysctl "perf_sample_time_clk_id" attribute (usually available > as "/proc/sys/kernel/perf_sample_time_clk_id") which can be used by the > user to obtain the clk_id to be used with POSIX clock API (eg. > clock_gettime()) to obtain a time value comparable with perf samples. > > Old behaviour can be restored by using "perf_use_local_clock" kernel > parameter. > > Signed-off-by: Pawel Moll I know that you're busy with other stuff, but it's already rc7 time again... We can leave the other two patches from the series for later, but how about getting this one merged for 3.20 and ending the 2 or 3 years long struggle? I'm not saying that everyone is happy about it, but no one seems to be unhappy enough to speak :-) Cheers! Pawel -- 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/