Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5166227ybb; Tue, 24 Mar 2020 12:07:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtfC7eYeiCrTGlLYkeT7beIy+ORln2t1OvNnnlny8iP1UorWQLQlMPEc8iQtbBW5FJqwh3y X-Received: by 2002:aca:4a08:: with SMTP id x8mr4679237oia.158.1585076878159; Tue, 24 Mar 2020 12:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585076878; cv=none; d=google.com; s=arc-20160816; b=mG2WH1YMZ0PSvwo9IeG0tcX9GEvmChKTZ1IAdopQ3WDClGibtdcnoWdEDj6t0uGI01 DJoi63HbBlTPIpy+1w+1J8/zLSAhghe+OHKu85qiT0z8+MyDCPwbdoR5xHhfap6Fv+OM ODpGE8G3KgeESm5fbsgscRs/eW8Lfm7cesDMpYnEvM42RLTbe0T4Qb68bJbj5HFKwlZi erH9VX5P6cnVKOi5BpOhUCooboFpUUzaWWfcacju33djeqPJFVKGLcEkCoDa9ny5c1c1 an9VZkoa/Wj0YZfbGigBxNQRb6mXnayhMrmnSZhc+tkopLhnSbLeV11Wk/dAihh1K9jv U9zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=mQXiLSPViiwhkM4wrjCnhSuUkI66tAeCX4Yqeo47LM0=; b=u0/j/YUd/elQxrEA8vJ3dBvLU+g+LKpuHUkAlHS7A+eRz88Yexq3nOn6BXEOmKZDJe N0D7lHArXhrx45PnrCiQ5X+JzEXNRJtvUypM/7KeJtYopd77itS644XilLdPWdVNzKca z3XnolC3miS4frzcQxsjbEJBrtFTebXn5cqStRMIa7IwRJX3YzvwVOR0FnLmW5zEnvGI MpE38Z67tNB5pk6LDaiQIwgne4mYCo/vKsNlMiLRUhChxd5oPOL4Z35OzWRGOAaHQm4C OnZa3lQ0ZDr+CskhHvkD6kICnicCshudHTNQhsQ3CkWPz+d1/63H67OtJ0s5x9rTYsGV FziA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+lJZjp+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id f26si9911919otc.182.2020.03.24.12.07.42; Tue, 24 Mar 2020 12:07:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+lJZjp+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727835AbgCXTFb (ORCPT + 99 others); Tue, 24 Mar 2020 15:05:31 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:44620 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727672AbgCXTFa (ORCPT ); Tue, 24 Mar 2020 15:05:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585076729; 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=mQXiLSPViiwhkM4wrjCnhSuUkI66tAeCX4Yqeo47LM0=; b=g+lJZjp+LyJLeuuvP6wBHqmKThWuy7im4rfdRES8k8roCcHmOykCqnJulNQoohHg4V0j40 4vB8WtAF4ZxqmCZdLI8Ar+x9TKc6JHJ0HujppHz4L5APR1LXtCecS8Hr22uIPpU4k4zFnf 0TxpbRWYYMLAC0uR/cX83zPA6Y0ioQM= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-318-Q97Z_sLmMk2KUfEAlBwzig-1; Tue, 24 Mar 2020 15:05:20 -0400 X-MC-Unique: Q97Z_sLmMk2KUfEAlBwzig-1 Received: by mail-wr1-f72.google.com with SMTP id v6so9581590wrg.22 for ; Tue, 24 Mar 2020 12:05:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mQXiLSPViiwhkM4wrjCnhSuUkI66tAeCX4Yqeo47LM0=; b=imIMF8TXbrGbpxMLZleZpKt6tad2i2G0tbJu+qH0MvKvYeUtgIgkcYFNjnrCAmBaUu mxIBM7dPCdmWfMInpiUPpaI88NUaCOqsX4Oa+nqWXlOyUiBj3iNFO5XOIRAmmdcB2BKw AEU64wiXfYAjo3VFUJOsdiXLVvrsi902CsJ29O4onEOYvh79RHGDPwuUs/WQ2/sPyW/q 03HTDtbT1maRhpjUATYir55RyZxPpZL19jCM9G02YKAfgC9ER7kddD49SRgzJOiVHSL6 LStTn3ztUE2JgkFw9VULHO89HbfA6lB3CzIJhNufowMXIq5+OZf21WKAphyxoP/2bu9W 3NJg== X-Gm-Message-State: ANhLgQ1inGS8+bbgiB/oVZHPF9Fpc8NJ1D9cSVtjog2Ky8IUWN157ce7 2dQ34lYSZghxlijeEUmmN7fOVArvdd0Qxi7mB10NvY6BlUrI6+1wp+DPvpvGSf3ykOAH+cLujAM y50zj2hq3RAwedDT1IFm0c5Wf X-Received: by 2002:a5d:5512:: with SMTP id b18mr37873109wrv.215.1585076718694; Tue, 24 Mar 2020 12:05:18 -0700 (PDT) X-Received: by 2002:a5d:5512:: with SMTP id b18mr37873075wrv.215.1585076718459; Tue, 24 Mar 2020 12:05:18 -0700 (PDT) Received: from ?IPv6:2a02:8388:7c1:1280:a281:9dab:554b:2fdc? (2a02-8388-07c1-1280-a281-9dab-554b-2fdc.cable.dynamic.v6.surfer.at. [2a02:8388:7c1:1280:a281:9dab:554b:2fdc]) by smtp.gmail.com with ESMTPSA id m7sm7785372wro.41.2020.03.24.12.05.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Mar 2020 12:05:16 -0700 (PDT) Subject: Re: [PATCH] perf script: add flamegraph.py script To: Kim Phillips , linux-perf-users@vger.kernel.org Cc: Martin Spier , Brendan Gregg , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org References: <20200320151355.66302-1-agerstmayr@redhat.com> <7176b535-f95b-bf6d-c181-6ccb91425f96@amd.com> From: Andreas Gerstmayr Message-ID: <21c81775-876a-4dd2-f52f-42645963350f@redhat.com> Date: Tue, 24 Mar 2020 20:05:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <7176b535-f95b-bf6d-c181-6ccb91425f96@amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24.03.20 17:16, Kim Phillips wrote: > On Ubuntu 19.10, where python 2.7 is still the default, I get: > > $ perf script report flamegraph > File "/usr/libexec/perf-core/scripts/python/flamegraph.py", line 46 > print(f"Flame Graph template {self.args.template} does not " + > ^ > SyntaxError: invalid syntax > Error running python script /usr/libexec/perf-core/scripts/python/flamegraph.py > > Installing libpython3-dev doesn't help. Hmm, I was hoping that I can drop support for Python 2 in 2020 ;) (it's officially EOL since Jan 1, 2020) The Ubuntu 18.04 release notes mention that "Python 2 is no longer installed by default. Python 3 has been updated to 3.6. This is the last LTS release to include Python 2 in main." (https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes) - so imho it should be fine to drop Python 2 support. I tested it with a Ubuntu VM, and by default the Python bindings aren't enabled in perf (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1707875). But you can compile perf and select Python 3: $ make -j2 PYTHON=python3 in the perf source directory (libpython3-dev must be installed). Does this work for you? Cheers, Andreas