Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp397316pxb; Thu, 25 Feb 2021 05:37:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUKSSd9qF+IGyyRCJo+h+3Q2UE9QL5CMtc4LuLSBIoUbsAIHE6EMXGudcsmk4IWRBzTHSm X-Received: by 2002:a17:907:2d10:: with SMTP id gs16mr2757183ejc.0.1614260223089; Thu, 25 Feb 2021 05:37:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614260223; cv=none; d=google.com; s=arc-20160816; b=CgphRdFmu3Z9IU4DGoNi9aJWSFRpTImXvwI4BGb6Ju1moR9tIiMwyeA+o4mp1W4Jne KrGMh73XwPMlGxEL8IBHkPzcRvO6aQVaSCrYHQJt5D9gBFrVFv1zTFIphxhWJyh8V1Nt QU5A6fgZAWsR12jzoMQR7pM5Ri5LH4ZI1t5ATw9ZEAq0S0b4O4nJTIcii4LYiMYphDfR cWRbMDMZFhgNNM+KCCNB72qX5EGRkbgocFk3mMz3zzEJW6zOj7rub/pgEQu5zEBxYUBd aZcT7pf6E9czwv3qU0VQnmSQuV/6qdUTKrgZEUOIC7DV45oMimtCuElPX0DZ65C2MbF9 zrEQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AS6EiwtZyyoU3dNAZrLEKhdhiP8jwGeoxh5a78NRZnI=; b=0uT/XF75v+T/Wqt6CAyAlH27v1UooJfMzoVB/3IKCRukrcHhiwGW5WUVvLYPhiQXdC ptbwstbyXxqwCZ99rPSB2UVYbzSHIFXB6p3QqEwVIPhSNIQMxuCU38mx1yEhitCtR+lf Nj50SRBCZ1BRXfGPHED5JOEzepqVklK0GlBqcC5d4RBCfC6zeM8sAhYmMrZg5/WxYcdG iFnRiGJvnVEpVsPW9UAPEhdiMrR3DHmn3Kwb87/44vAGf38beVf1oCB9+GZy2eVXNxot LLXwWehZgiPF+yO7LnZQDB94bbDYTcFnGCCtkL2PYU9uT++XqwsfyjrmCbamyXlPgt3f Q9Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hlGjiIgI; 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 ah20si3201895ejc.279.2021.02.25.05.36.40; Thu, 25 Feb 2021 05:37:03 -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=hlGjiIgI; 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 S231274AbhBYNfk (ORCPT + 99 others); Thu, 25 Feb 2021 08:35:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:35485 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbhBYNff (ORCPT ); Thu, 25 Feb 2021 08:35:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614260048; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AS6EiwtZyyoU3dNAZrLEKhdhiP8jwGeoxh5a78NRZnI=; b=hlGjiIgIHegbdWEckhP+QUv5aEEf8qFlPV9XbUa5x7E+U3olVeg6bdWs452vMcrLj+4Zji nJWe3wuWYX6o32LMsqIHdeAtOTzQkn56gANwhbVAlaa2sEqiiTouaUYKIbvtFE8XMUpY/M DBxD5xKdsyGuuClgB/xj3pgzzIL0b4k= 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-200-QaXpD2MkMz6NMm6sYYJKeA-1; Thu, 25 Feb 2021 08:34:04 -0500 X-MC-Unique: QaXpD2MkMz6NMm6sYYJKeA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DF8B6193578B; Thu, 25 Feb 2021 13:34:01 +0000 (UTC) Received: from krava (unknown [10.40.194.234]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3609E5D6D7; Thu, 25 Feb 2021 13:33:58 +0000 (UTC) Date: Thu, 25 Feb 2021 14:33:57 +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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2021 at 04:06:23PM +0800, Jin, Yao wrote: > Hi Chris, Arnaldo, Jiri, > > We observe the parsing error for "software/xxx/" on some platforms. > > For example, > > # perf stat -e software/r1a/ -a -- sleep 1 > event syntax error: 'software/r1a/' > \___ parser error > Run 'perf list' for a list of valid events > > Usage: perf stat [] [] > > -e, --event event selector. use 'perf list' to list available events > > And perf test is failed too. > > # perf test 6 -vv > ... > running test 4 'software/r1a/'failed to parse event 'software/r1a/', err 1, str 'parser error' > event syntax error: 'software/r1a/' > \___ parser error > > running test 4 'software/r0x1a/'failed to parse event 'software/r0x1a/', err 1, str 'parser error' > event syntax error: 'software/r0x1a/' > \___ parser error > ... > > The issue should be the conflict between event "i915/software-gt-awake-time/" and pmu "software". > > # perf list | grep i915/software > i915/software-gt-awake-time/ [Kernel PMU event] > > Perf supports the event format as "prefix-xxx-suffix", so the "software" > string in "software-gt-awake-time" is added to perf_pmu_events_list as > PMU_EVENT_SYMBOL_PREFIX. When parsing the string such as "software/xxx/", > it’s parsed as PMU_EVENT_SYMBOL_PREFIX for "software", then it would error > out in next processing. > > So the easy way is to rename "software-gt-awake-time" to "gt-awake-time", > right? Otherwise we have to hardcode something in perf tool. > > What do you think of this issue and the solution? > > BTW, as the robot reported, it's related to the commit 8c3b1ba0e7ea > ("drm/i915/gt: Track the overall awake/busy time"). yes, I think you're right.. I'll try to reproduce and check on this I'm still not clear why is that parsing fail if those 2 events are distinguished by - and / ... but yep, we are asking for trouble in here ;-) I think we could either prioritaze one or add extra check when we add prefix-xxx-suffix events and do not add ones that have conflict.. that seems like best solution to me now thanks, jirka