Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbdGMOVE (ORCPT ); Thu, 13 Jul 2017 10:21:04 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46027 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752082AbdGMOVC (ORCPT ); Thu, 13 Jul 2017 10:21:02 -0400 Date: Thu, 13 Jul 2017 19:50:02 +0530 From: "Naveen N. Rao" To: Jiri Olsa , Vince Weaver Cc: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Notifications for perf sideband events References: <20170712104858.GA5583@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170712104858.GA5583@krava> User-Agent: NeoMutt/20170609 (1.8.3) X-TM-AS-MML: disable x-cbid: 17071314-0012-0000-0000-00000257014D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071314-0013-0000-0000-000007708505 Message-Id: <20170713142002.udgtzxdv6n7y3w3z@naverao1-tp.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-13_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707130226 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1546 Lines: 42 [ Adding Vince...] On 2017/07/12 12:48PM, Jiri Olsa wrote: > On Mon, Jun 19, 2017 at 08:01:06PM +0530, Naveen N. Rao wrote: > > Currently, there is no way to ask for signals to be delivered when a > > certain number of sideband events have been logged into the ring buffer. > > This is problematic if we are only interested in, say, context switch > > events. Furthermore, signals are more useful (rather than polling) for > > self-profiling. This series provides for a way to achieve this. > > > > We ride on top of the existing support for ring buffer wakeup to > > generate signals as desired. Counting sideband events still requires > > some changes in the output path, but in normal cases, it ends up being > > just a comparison. > > > > The test program below demonstrates how a process can profile itself for > > context switch events and how it can control notification through > > signals. The key changes include the below perf_event_attr settings as > > well as use of IOC_ENABLE: > > pe.signal_on_wakeup = 1; > > pe.count_sb_events = 1; > > pe.wakeup_events = 2; > > Vince, > could you please check on this? thanks > > Naveen, > have you run Vince's test suite on this? > http://github.com/deater/perf_event_tests.git I just tried this and I see quite a few failures even without these patches. The behavior is similar with/without these patches and all the ioctl tests pass, but I see some failures with the overflow tests. I'll look into those tests in detail tomorrow. I may be missing something. Thanks, Naveen