From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757032Ab1KUVpX (ORCPT ); Mon, 21 Nov 2011 16:45:23 -0500 Received: from mail-yw0-f46.google.com ([209.85.213.46]:53979 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753087Ab1KUVpW (ORCPT ); Mon, 21 Nov 2011 16:45:22 -0500 MIME-Version: 1.0 In-Reply-To: <1321911730.28118.35.camel@twins> References: <1321901536.28118.20.camel@twins> <1321911730.28118.35.camel@twins> Date: Mon, 21 Nov 2011 22:45:21 +0100 Message-ID: Subject: Re: [tip:perf/urgent] perf/x86: Enable raw event access to Intel offcore events From: Stephane Eranian To: Peter Zijlstra Cc: Vince Weaver , mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@elte.hu Content-Type: text/plain; charset=UTF-8 X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 21, 2011 at 10:42 PM, Peter Zijlstra wrote: > On Mon, 2011-11-21 at 22:39 +0100, Stephane Eranian wrote: >> To solve this problem (in the general case), you need to know which >> counter is taken (or required) >> by ALL pinned system-wide events across all CPUs. Once you've >> constructed the bitmap, you can >> use it as the basis (used_mask) to try and schedule the group events. >> > Its worse, you also need to consider all task-pinned events if you want > to be complete. That's an even worse problem. > But that you know because by the time you do the simulation you already know the task the events are attached to. You can get to the list of events already attached to the task. Again this is a best effort, it could well be that someone else attaches pinned task events just after the simulation.