Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753085AbdHVUr5 (ORCPT ); Tue, 22 Aug 2017 16:47:57 -0400 Received: from merlin.infradead.org ([205.233.59.134]:60052 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753061AbdHVUrz (ORCPT ); Tue, 22 Aug 2017 16:47:55 -0400 Date: Tue, 22 Aug 2017 22:47:43 +0200 From: Peter Zijlstra To: Alexey Budankov Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Andi Kleen , Kan Liang , Dmitri Prokhorov , Valery Cherepennikov , Mark Rutland , Stephane Eranian , David Carrillo-Cisneros , linux-kernel Subject: Re: [PATCH v6 2/3]: perf/core: use context tstamp_data for skipped events on mux interrupt Message-ID: <20170822204743.GR32112@worktop.programming.kicks-ass.net> References: <96c7776f-1f17-a39e-23e9-658596216d6b@linux.intel.com> <20170803150052.za2vofyqfgarukdr@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 726 Lines: 19 On Thu, Aug 10, 2017 at 06:57:43PM +0300, Alexey Budankov wrote: > The key thing in the patch is explicit updating of tstamp fields for > INACTIVE events in update_event_times(). > @@ -1405,6 +1426,9 @@ static void update_event_times(struct perf_event *event) > event->group_leader->state < PERF_EVENT_STATE_INACTIVE) > return; > > + if (event->state == PERF_EVENT_STATE_INACTIVE) > + perf_event_tstamp_update(event); > + > /* > * in cgroup mode, time_enabled represents > * the time the event was enabled AND active But why!? I thought the whole point was to not need to do this. The thing I outlined earlier would only need to update timestamps when events change state and at no other point in time.