From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756734Ab2DZNMh (ORCPT ); Thu, 26 Apr 2012 09:12:37 -0400 Received: from am1ehsobe002.messaging.microsoft.com ([213.199.154.205]:57559 "EHLO am1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756375Ab2DZNMg (ORCPT ); Thu, 26 Apr 2012 09:12:36 -0400 X-SpamScore: -3 X-BigFish: VPS-3(zz98dKzz1202hzzz2dh668h839h944hd25h) X-Forefront-Antispam-Report: CIP:163.181.249.109;KIP:(null);UIP:(null);IPV:NLI;H:ausb3twp02.amd.com;RD:none;EFVD:NLI X-WSS-ID: 0M338OL-02-JTE-02 X-M-MSG: Date: Thu, 26 Apr 2012 15:12:20 +0200 From: Robert Richter To: Peter Zijlstra CC: Stephane Eranian , LKML , Arnaldo Carvalho de Melo , , David Ahern , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Jiri Olsa Subject: Re: [BUG] perf stat: useless output for raw events with new event parser Message-ID: <20120426131220.GB5046@erda.amd.com> References: <1335178132.28150.117.camel@twins> <1335436031.13683.6.camel@twins> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1335436031.13683.6.camel@twins> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: amd.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26.04.12 12:27:11, Peter Zijlstra wrote: > Furthermore, once we have a common format, we could even ask Intel/AMD > (and other vendors) to provide their data in this format. I don't think that can be done with a reasonable effort. Trying to abstract the pmu description in sysfs to let user space know about the pmu? We will never fit everything. And we have duplicate code, esp. bit masks etc in the kernel and userland. What has been simple bit mask macros in the past are now tons of bit name and mask pairs provided by sysfs, generated by the kernel and reassembled in userland. Could it be any more complicated? Really this can't be handled. Why not simply pass an identifier for each kind of pmu and then only add pmu specific code in userland? Much easier than all this sysfs format thing, where the kernel tries to tell userland what to do, which the kernel never can do exactly. And even if we can describe everything with sysfs, kernel and userland code becomes bloated, it actually is already, looking at the recent perf tool and kernel updates. -Robert -- Advanced Micro Devices, Inc. Operating System Research Center