Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751273AbeAPP2D (ORCPT + 1 other); Tue, 16 Jan 2018 10:28:03 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56120 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750964AbeAPP2C (ORCPT ); Tue, 16 Jan 2018 10:28:02 -0500 Subject: Re: [RFC 0/5] per-event settings fixes To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Hendrick Brueckner , Namhyung Kim , Noel Grandin , Wang Nan References: <20180116142438.19520-1-acme@kernel.org> From: Thomas-Mich Richter Organization: IBM LTC Date: Tue, 16 Jan 2018 16:27:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180116142438.19520-1-acme@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-IE Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18011615-0020-0000-0000-000003EB4D6A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011615-0021-0000-0000-0000427D848D Message-Id: <5e418aa0-d966-59d4-f024-a5fc61500f8d@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-16_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801160215 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/16/2018 03:24 PM, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > Hi guys, > > Jiri asked me to post this series, so here it is, please take a > look, I'd love to harvest your Reviewed-by/Tested-by/Acked-by, > > - Arnaldo > > Arnaldo Carvalho de Melo (5): > perf callchain: Fix attr.sample_max_stack setting > perf unwind: Do not look at globals > perf trace: Setup DWARF callchains for non-syscall events when --max-stack is used > perf trace: Allow overriding global --max-stack per event > perf callchains: Ask for PERF_RECORD_MMAP for data mmaps for DWARF unwinding > > tools/perf/builtin-trace.c | 19 ++++++++++++++++--- > tools/perf/util/evsel.c | 24 +++++++++++++++++------- > tools/perf/util/unwind-libunwind-local.c | 9 --------- > 3 files changed, 33 insertions(+), 19 deletions(-) > I have tested your patches on my s390x. I applied them on top of your perf/core branch. Here is the output: [root@s8360047 perf]# ./perf trace --no-syscalls -e probe_libc:inet_pton ping -6 -c 1 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.046 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.046/0.046/0.046/0.000 ms 0.000 probe_libc:inet_pton:(3ffa4ec2060)) [root@s8360047 perf]# Test ok ! [root@s8360047 perf]# ./perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=5,call-graph=dwarf/ ping -6 -c 1 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.054 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.054/0.054/0.054/0.000 ms 0.000 probe_libc:inet_pton:(3ff7e742060)) __GI___inet_pton (/usr/lib64/libc-2.26.so) gaih_inet (inlined) __GI_getaddrinfo (inlined) main (/usr/bin/ping) __libc_start_main (/usr/lib64/libc-2.26.so) [root@s8360047 perf]# Test ok! [root@s8360047 perf]# ./perf trace --no-syscalls -e probe_libc:inet_pton/call-graph=dwarf/ ping -6 -c 1 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.062 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.062/0.062/0.062/0.000 ms 0.000 probe_libc:inet_pton:(3ff86642060)) __GI___inet_pton (/usr/lib64/libc-2.26.so) gaih_inet (inlined) __GI_getaddrinfo (inlined) main (/usr/bin/ping) __libc_start_main (/usr/lib64/libc-2.26.so) _start (/usr/bin/ping) [root@s8360047 perf]# Test ok: [root@s8360047 perf]# ./perf trace --no-syscalls --call-graph dwarf --max-stack 4 -e probe_libc:inet_pton ping -6 -c 1 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.031 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.031/0.031/0.031/0.000 ms 0.000 probe_libc:inet_pton:(3ffa1bc2060)) __GI___inet_pton (/usr/lib64/libc-2.26.so) gaih_inet (inlined) __GI_getaddrinfo (inlined) main (/usr/bin/ping) [root@s8360047 perf]# Test ok, also when --max-stack 4 is omitted the complete backchain is printed. [root@s8360047 perf]# ./perf trace --no-syscalls --call-graph dwarf -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.047 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.047/0.047/0.047/0.000 ms 0.000 probe_libc:inet_pton:(3ffb4bc2060)) [root@s8360047 perf]# Test fails, I would have expected some callchain output. [root@s8360047 perf]# ./perf trace --no-syscalls --call-graph dwarf --max-stack 4 -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.055 ms --- ::1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.055/0.055/0.055/0.000 ms 0.000 probe_libc:inet_pton:(3ff7e6c2060)) [root@s8360047 perf]# Test fails, I would have expected some callchain output. It looks like /max-stack=3/ without ,call-graph=dwarf does not trigger the stack unwinding. -- Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany -- Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294