From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78CEFC04FF3 for ; Mon, 24 May 2021 09:40:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50CC961076 for ; Mon, 24 May 2021 09:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232514AbhEXJmG (ORCPT ); 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