Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp585225ybj; Thu, 7 May 2020 02:54:33 -0700 (PDT) X-Google-Smtp-Source: APiQypItkpnfCusbKYJ6E2S0bPHeFCqw/l8ELq7WpnhMc12bzawGALM6vm/zKlzdlJytdZO/0FLn X-Received: by 2002:aa7:d513:: with SMTP id y19mr11412788edq.367.1588845273761; Thu, 07 May 2020 02:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588845273; cv=none; d=google.com; s=arc-20160816; b=GVgy5Dk9tWDCiy6RiKt/NpocoGHYBBm0Z5ujU1792L4fOH0wsU2kuUXTHM0WaKoNP3 El8bN2j61lOaypS4LiW5IuDMw0EtYJn4mEkKcKes1kdU9ka+ztqsKgs49ArjvcQgGB8Q 6wxZMgBKRXLVlGlmoeGwTCcgG5hVgD0rWerTr8nCnc4HAg82tEibc/IMWhh33PK02lRz XQM7VYVP/AiF8MiNPxNzYPj2tXB3XCnsnHzLAUIPVA9nWFAUzXGGnPUHlWTMQFUMO3WE lJdxIfQSpxh4HyMZPWJMTfZKA3i7o/Lqf9j5KpQ0VOODI5fjpHgOp/YotF9fbG35Zfmi MnJQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZskoirPD3jMBlgkmnF9LBhUevUPtKG8WGMNTU3kPyyQ=; b=GwpfB+KF/tJzdxfwFLNXnCyDiCcP4G3jeawDSdRW9TjWzG2cGxzwmH3YOpz4aJbZd3 78IFP2yq5LbhDUm4PGL01Lvf+mCjR0HKyBBzM27mgYhyEadsTLLwmxlmfIAJP6Eia02f yoxa34WNsDGQUwcBBksrUc24zVZxvF/B2Ml0FaH77ASrOvu0PObfZTLdtrLfv+Vr3YSu y8tl15hNuI7dTpEfbggaiXF0d8kFH6LYDTa4ZyKAT4nvfsoufetUFJrko8e2S4YSHHUv 5KbB+6OHXWcUra3Bke16X/XdQYBqyIXq5ndiCCeaL6XhaKCuhTdIRht+Yhe1hWVX/MBj hywQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si2593082edr.309.2020.05.07.02.54.10; Thu, 07 May 2020 02:54:33 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbgEGJvR convert rfc822-to-8bit (ORCPT + 99 others); Thu, 7 May 2020 05:51:17 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32953 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbgEGJvQ (ORCPT ); Thu, 7 May 2020 05:51:16 -0400 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-8-LUyIP0opP-Oqd82D9mY13w-1; Thu, 07 May 2020 05:51:07 -0400 X-MC-Unique: LUyIP0opP-Oqd82D9mY13w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC293462; Thu, 7 May 2020 09:51:05 +0000 (UTC) Received: from krava.redhat.com (unknown [10.40.194.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D2C110013BD; Thu, 7 May 2020 09:51:03 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Ian Rogers , Paul Khuong Subject: [PATCH 5/5] perf script: Enable IP fields for callchains Date: Thu, 7 May 2020 11:50:24 +0200 Message-Id: <20200507095024.2789147-6-jolsa@kernel.org> In-Reply-To: <20200507095024.2789147-1-jolsa@kernel.org> References: <20200507095024.2789147-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case the callchains were deleted in pipe mode, we need to ensure that the IP fields are enabled, otherwise the callchain is not displayed. Enabling IP and SYM, which should be enough for callchains. Signed-off-by: Jiri Olsa --- tools/perf/builtin-script.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 5c4a580c048a..ecc8bd4c5e57 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -2118,8 +2118,6 @@ static int process_attr(struct perf_tool *tool, union perf_event *event, return 0; } - set_print_ip_opts(&evsel->core.attr); - if (evsel->core.attr.sample_type) { err = perf_evsel__check_attr(evsel, scr->session); if (err) @@ -2132,6 +2130,13 @@ static int process_attr(struct perf_tool *tool, union perf_event *event, */ sample_type = perf_evlist__combined_sample_type(evlist); callchain_param_setup(sample_type); + + /* Enable fields for callchain entries, if it got enabled. */ + if (callchain_param.record_mode != CALLCHAIN_NONE) { + output[output_type(evsel->core.attr.type)].fields |= PERF_OUTPUT_IP | + PERF_OUTPUT_SYM; + } + set_print_ip_opts(&evsel->core.attr); return 0; } -- 2.25.4