Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbdCQOjE (ORCPT ); Fri, 17 Mar 2017 10:39:04 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:35057 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbdCQOjC (ORCPT ); Fri, 17 Mar 2017 10:39:02 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Fri, 17 Mar 2017 10:37:48 -0400 (EDT) X-X-Sender: vince@macbook-air To: "linux-kernel@vger.kernel.org" cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Subject: Re: perf: negative time_enabled issue In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 20 On Tue, 14 Mar 2017, Vince Weaver wrote: > So another obscure rdpmc problem, turned up by the PAPI regression tests. > > If you use rdpmc, and your event is attached measuring another process, > and then you ENABLE/DISABLE/ENABLE/rdpmc the event > > somehow the userpg->time_enabled field gets a weird value and that > completely confuses code expecting enabled!=running to mean multiplexing > is happening. Still working on this issue. It turns out it's not rdpmc specific, you can see it with a regular read() too. So far I've traced it back far enough to see that shadow_ctx_time is ending up negative for some reason if you do an enable/disable/enable on an event attached to another process. I'm trying to trace it back further but it's a slow process. Vince