Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752450AbbEGORU (ORCPT ); Thu, 7 May 2015 10:17:20 -0400 Received: from mga09.intel.com ([134.134.136.24]:2646 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752422AbbEGORR convert rfc822-to-8bit (ORCPT ); Thu, 7 May 2015 10:17:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,384,1427785200"; d="scan'208";a="706715378" From: "Liang, Kan" To: Andi Kleen CC: "peterz@infradead.org" , "mingo@kernel.org" , "acme@infradead.org" , "eranian@google.com" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH V8 8/8] perf tools: handle PERF_RECORD_LOST_SAMPLES Thread-Topic: [PATCH V8 8/8] perf tools: handle PERF_RECORD_LOST_SAMPLES Thread-Index: AQHQiG/8L1c0IqS6okySkSymJRx2uZ1vy5cAgAC+tMA= Date: Thu, 7 May 2015 14:17:13 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07701819011@SHSMSX103.ccr.corp.intel.com> References: <1430940834-8964-1-git-send-email-kan.liang@intel.com> <1430940834-8964-9-git-send-email-kan.liang@intel.com> <20150507103342.GO2366@two.firstfloor.org> In-Reply-To: <20150507103342.GO2366@two.firstfloor.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1532 Lines: 48 > > On Wed, May 06, 2015 at 03:33:54PM -0400, Kan Liang wrote: > > From: Kan Liang > > > > This patch modified the perf tool to handle the new RECORD type, > > PERF_RECORD_LOST_SAMPLES. > > The number of lost-sample events is stored in > > .nr_events[PERF_EVENT_LOST_SAMPLES]. While the exact number of > samples > > which the kernel dropped is stored in total_lost_samples. > > When the percentage of dropped samples is greater than 5%, a warning > > will be sent out. > > That's nice. Would be good to also print this in perf report --stdio output > (without -D), like the samples are. > OK, I will do it. > Could you please do the same for the normal PERF_RECORD_LOST too? > There we don't have a exact percentage, but at least could count the lost > events too. This can be a separate patch of course, doesn't need to be tied > to this patchkit. I think current perf tool already did that. It will print warning for any lost. Is this what you want? if (session->tool->lost == perf_event__process_lost && stats->nr_events[PERF_RECORD_LOST] != 0) { ui__warning("Processed %d events and lost %d chunks!\n\n" "Check IO/CPU overload!\n\n", stats->nr_events[0], stats->nr_events[PERF_RECORD_LOST]); } Thanks, Kan > > > -Andi -- 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/