From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751976Ab3LKLZg (ORCPT ); Wed, 11 Dec 2013 06:25:36 -0500 Received: from mail-ea0-f171.google.com ([209.85.215.171]:37687 "EHLO mail-ea0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751909Ab3LKLZa (ORCPT ); Wed, 11 Dec 2013 06:25:30 -0500 Date: Wed, 11 Dec 2013 12:25:26 +0100 From: Ingo Molnar To: David Ahern Cc: linux-kernel@vger.kernel.org, Pawel Moll , Frederic Weisbecker , Peter Zijlstra , Arnaldo Carvalho de Melo , Mike Galbraith , Jiri Olsa , Namhyung Kim , Stephane Eranian , John Stultz , Sonny Rao , Thomas Gleixner Subject: Re: [PATCH] perf: POSIX CLOCK_PERF to report current time value Message-ID: <20131211112526.GC25541@gmail.com> References: <1386707259-21725-1-git-send-email-dsahern@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1386707259-21725-1-git-send-email-dsahern@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * David Ahern wrote: > From: Pawel Moll > > To co-relate user space events with the perf events stream > a current (as in: "what time(stamp) is it now?") time value > must be made available. So I'm wondering about your earlier approach posted here: https://lkml.org/lkml/2011/6/7/636 I'd modify that patch the following way: instead of tracking each separate reason, perhaps only track timekeeping_update(). Such a tracepoint, combined with PERF_SAMPLE_TIME, would very accurately track external changes to GTOD (xtime). That leaves us with tracking/correlating the regular flow of time, which could be achieved by another tracepoint in: kernel/time/timekeeping.c::do_timer() So only two new tracepoints are needed AFAICS - and the tracepoints would obviously be useful for other (debugging) purposes as well. Would that solve the wall-clock correlation problem adequately? Thanks, Ingo