Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1856705pxb; Sat, 27 Feb 2021 02:24:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpxtyJe/xmDKRfwdYaEEE5RK4g9Iv/gXS3qHP1/Hj6Q/Szels0Z/MiRBtVpVWlAsJsZxj1 X-Received: by 2002:a05:6402:2694:: with SMTP id w20mr7586577edd.200.1614421477010; Sat, 27 Feb 2021 02:24:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614421477; cv=none; d=google.com; s=arc-20160816; b=G7XT35PgRKSQkGIU8yVv4LHrhV0VXjftr8Id3hHvJ69pYUE8FFcBgzW6+ktRWSxjXW 1geMpeKz7llUq9wfe85grMBt/m1OwCwa13O1Oas0NI9DmpiyR+sm06GFKlfBqWFMXv60 GjURTDBKRM34F4d5vpSuq0rDeqIyos/1RjzBpi7PNRkiD58VXVGOXSj/6NSQLa+PtsMq 4Fpt3p0ebMMKZMPTThXOYlT12B7SUd4aKf/tPwXx1PzWNBvo95Pa8f4nWz7oJ2i7FkeR d/8y3mfFb/1CzITsYCA2jK3VBslI2dYNmGEaa5bJPwmhHU1GZNi9EESYhzVzKjDK0KnS DBvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x4boTmbFJLEQoptrKt5kEwfXa9GVrbVMebNjaAMdkPc=; b=Hy1zJoyXFF8BLfaRr/EEqMUaxQFKx9Qv48m7xME/4oSbJedVFJv/ea4rlCErgaqkkf U9+q0uEfks9zKMnLhEL+zVzc7ZSp8DJNSAQAfiC1DsDBuLsqO48bBQphI9TAauKs8ilG NfRAza0A1tomBSzHOsxHxSIOigsK7rXFhiBeorpQRqnUYlXYEaF5v41Tw11GfbGRGyAC QknuZ1ixW5l51D6GfxFC9KSnN1WSlmyAgKwXu1q3hox4KWAOEHjpBzu1byWlPnecPXna krIN7PVaZivyZb9EWAUN1lKteb2DKE5P2QIyRWZVpzyItT4Oy7rHOQCDBg8u39ZLRErC UlGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gddGb0cM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si9351575edi.554.2021.02.27.02.24.13; Sat, 27 Feb 2021 02:24:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gddGb0cM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbhB0KXG (ORCPT + 99 others); Sat, 27 Feb 2021 05:23:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60166 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbhB0KXD (ORCPT ); Sat, 27 Feb 2021 05:23:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614421296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=x4boTmbFJLEQoptrKt5kEwfXa9GVrbVMebNjaAMdkPc=; b=gddGb0cMeBXBiB6XfDWOQHuOqI/+HM5BOoxJ+Zz7GIpnSMKXzDa+fSM/29Bkzgvn076Z8q VZVIlEuEu/C62FUJK2esNBisfna4KxLYzD3T9MRmrlflTwIM/dKCAtldD1VdF/vuWLeHmD zUMS0mSx4RXNNV/2gZFoHmFVU9GKASI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-8AefJaDjPZCZ1x8kNTmRbg-1; Sat, 27 Feb 2021 05:21:32 -0500 X-MC-Unique: 8AefJaDjPZCZ1x8kNTmRbg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ACFC18018A1; Sat, 27 Feb 2021 10:21:30 +0000 (UTC) Received: from krava (unknown [10.40.192.60]) by smtp.corp.redhat.com (Postfix) with SMTP id 17F9418AAB; Sat, 27 Feb 2021 10:21:25 +0000 (UTC) Date: Sat, 27 Feb 2021 11:21:25 +0100 From: Jiri Olsa To: "Jin, Yao" Cc: kernel test robot , Chris Wilson , Arnaldo Carvalho de Melo , Jiri Olsa , Tvrtko Ursulin , Matthew Brost , LKML , lkp@lists.01.org, lkp@intel.com, Andi Kleen , Adrian Hunter , "Liang, Kan" , "Jin, Yao" , "Yi, Ammy" Subject: Re: [drm/i915/gt] 8c3b1ba0e7: perf-sanity-tests.Parse_event_definition_strings.fail Message-ID: References: <20210224074841.GD6114@xsang-OptiPlex-9020> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 08:41:26AM +0800, Jin, Yao wrote: SNIP > > + SET_SYMBOL(prefix, PMU_EVENT_SYMBOL); > > len++; > > } > > } > > } > > + > > + /* unlikely, but still.. */ > > + if (!len) > > + goto err; > > + perf_pmu_events_list_num = len; > > + > > qsort(perf_pmu_events_list, len, > > sizeof(struct perf_pmu_event_symbol), comp_pmu); > > > > Thanks so much for the patch! It works with my tests. > > # ./perf test 6 > 6: Parse event definition strings : Ok > > # ./perf stat -e software/r1a/ -a -- sleep 1 > > Performance counter stats for 'system wide': > > software/r1a/ > > 1.000940433 seconds time elapsed > > In theory, do we also need to check suffix as well? I think returning > PMU_EVENT_SYMBOL_SUFFIX may also confuse the parser. But yes, we don't have > this case now. yep, let's wait for use case ;-) you can't have suffix without prefix, and that's the one failing, so I think we are fine thanks, jirka