Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3267511pxj; Mon, 24 May 2021 02:42:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQOYsuVbYfcJ4KZ8qTHDjDI1y4zXmPmJeKdzGoeB0s+XGyDBWkcapnGcSteB1Hiug4zR09 X-Received: by 2002:a17:906:456:: with SMTP id e22mr22122906eja.427.1621849322938; Mon, 24 May 2021 02:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621849322; cv=none; d=google.com; s=arc-20160816; b=iCZiSgS1XCDVgjUJEtfvdsZGTa7kGYVddkX8x2jlF+7sXdK4lSpdhJl4HSISjN2whx H7wFRRw8l+3dENSWfaS+HbTbZ2typG4OfwfXEvvmGtuPXkh8xg8TryIwBL4q+4BthTZd 1ihVsT+OXn4urM/WEG1ALD69pCr7N87UtVM7ZCCRrzDD1aTGiGpw9tQs9bhp21Vd3Yud dx73INf8rFVEYluVRzvWIAu/M9z+0on0pvgM2yfbeqzYkVOUqAo8aaM/uJ8mQH+UFE1c SLGzeWKjek/delg0plJ7wjog0X1hPbmijtB+rEZEbp8hTiRobmfLHRt53ejbYtOFJPDP XYaQ== 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=SEjqJcjwBItF1yzxfdl36Bmpov8c1JuS0sajBHJlriQ=; b=FAf45eaEGKnyHDhXQEgEHLfESn9XWjDlcMVvMeIbR1WR6t70LuFhOnE0pdP82f9TeY 5x/Pv3cYyGMt/ngAtQoteGRAs3bHHmmA6Z7gFFqvCYIN60k7B3WX1ZyU00O6s9/NgD2A zJ7ZAILOeO35sD2pkKKVnUWE+2rX3fRv2MDy+aQ3dtFNm9xzzePJxR5HCQUAHLs0RspT R/BKgyp9lEjgXmTpRTdRvJp5BufhkYO6aTXz0H99nKs3VX5yYaziXY9bcxMm/AIcZLr+ JsN3+1UScfrd4iIb65170vWZxSSPKl9EfmmtUm/x2MVCQHa8tY3Hxh9e1K/qdiszLDOJ C+sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OhU3ZJLx; 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 b7si3297118edd.415.2021.05.24.02.41.40; Mon, 24 May 2021 02:42:02 -0700 (PDT) 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=OhU3ZJLx; 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 S232442AbhEXJmG (ORCPT + 99 others); Mon, 24 May 2021 05:42:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51623 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232313AbhEXJmF (ORCPT ); Mon, 24 May 2021 05:42:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621849237; 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=SEjqJcjwBItF1yzxfdl36Bmpov8c1JuS0sajBHJlriQ=; b=OhU3ZJLxd9wVZThTooiHxqujjZGAzqEdGMiIPsCUkiF3yAGEWhz9KggGWClFuf1QngUO03 HujPSSCCB/xEfuPmItmK0pYLlgHm5D/2IaJg4BPhEguwTJEpQrv1+XJTZ8LsQABVuBicq4 YwAr7kvc73mriq4vk24isModbOneUcg= 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-310-0Jlo4_EqP4WG01Nezmr1Ug-1; Mon, 24 May 2021 05:40:34 -0400 X-MC-Unique: 0Jlo4_EqP4WG01Nezmr1Ug-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 174351B18BC6; Mon, 24 May 2021 09:40:34 +0000 (UTC) Received: from krava (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with SMTP id 3A76461F20; Mon, 24 May 2021 09:40:33 +0000 (UTC) Date: Mon, 24 May 2021 11:40:32 +0200 From: Jiri Olsa To: Adrian Hunter Cc: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] perf script: Find script file relative to exec path Message-ID: References: <20210524065718.11421-1-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210524065718.11421-1-adrian.hunter@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 24, 2021 at 09:57:18AM +0300, Adrian Hunter wrote: > Allow perf script to find a script in the exec path. > > Example: > > Before: > > $ perf record -a -e intel_pt/branch=0/ sleep 0.1 > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.954 MB perf.data ] > $ perf script intel-pt-events.py 2>&1 | head -3 > Error: Couldn't find script `intel-pt-events.py' > See perf script -l for available scripts. > $ perf script -s intel-pt-events.py 2>&1 | head -3 > Can't open python script "intel-pt-events.py": No such file or directory > $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3 > Error: Couldn't find script `/home/ahunter/libexec/perf-core/scripts/python/intel-pt-events.py' > See perf script -l for available scripts. > $ > > After: > > $ perf script intel-pt-events.py 2>&1 | head -3 > Intel PT Power Events and PTWRITE > perf 8123/8123 [000] 551.230753986 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) > perf 8123/8123 [001] 551.230808216 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) > $ perf script -s intel-pt-events.py 2>&1 | head -3 > Intel PT Power Events and PTWRITE > perf 8123/8123 [000] 551.230753986 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) > perf 8123/8123 [001] 551.230808216 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) > $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3 > Intel PT Power Events and PTWRITE > perf 8123/8123 [000] 551.230753986 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) > perf 8123/8123 [001] 551.230808216 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) > $ > > Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa thanks, jirka