Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758654AbZGCSbR (ORCPT ); Fri, 3 Jul 2009 14:31:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756475AbZGCSbD (ORCPT ); Fri, 3 Jul 2009 14:31:03 -0400 Received: from one.firstfloor.org ([213.235.205.2]:50862 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756472AbZGCSbC (ORCPT ); Fri, 3 Jul 2009 14:31:02 -0400 To: Vince Weaver Cc: Ingo Molnar , Peter Zijlstra , Paul Mackerras , linux-kernel@vger.kernel.org, Mike Galbraith Subject: Re: [numbers] perfmon/pfmon overhead of 17%-94% From: Andi Kleen References: <20090624151010.GA12799@elte.hu> <20090627060432.GB16200@elte.hu> <20090627064404.GA19368@elte.hu> <20090629210206.GB13125@elte.hu> Date: Fri, 03 Jul 2009 20:31:04 +0200 In-Reply-To: (Vince Weaver's message of "Thu, 2 Jul 2009 17:07:02 -0400 (EDT)") Message-ID: <87bpo1aaaf.fsf@basil.nowhere.org> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (gnu/linux) 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: 1128 Lines: 31 Vince Weaver writes: > > as I said in a previous post, on most x86 chips the instructions_retired > counter also includes any hardware interrupts that occur during the > process runtime. On the other hand afaik near all chips have interrupt performance counter events. So if you're willing to waste one of the variable counter registers you can always count those and then correct based on the other count. But the question is of course if it's worth it, the error should be really small. Also you could always lose a few cycles occasionally in other "random" events, which can happen too. > So any clock interrupts, etc, show up as an extra > instruction. So on the "million" benchmark, it's usually +/- 2 extra > instructions. 1-2 error in a million doesn't sound like a catastrophic problem. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/