Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2530781imm; Wed, 16 May 2018 14:34:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrOmYBGWrguZItpQAS3Wt/vzX2eMNDv9dvPqf75Toy0iWTgW53Sp4SEZWCo2BsHHYvQcCud X-Received: by 2002:a62:22db:: with SMTP id p88-v6mr2596407pfj.239.1526506494326; Wed, 16 May 2018 14:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526506494; cv=none; d=google.com; s=arc-20160816; b=NAnfEhHM8JZcFE4QUkU/eVllhrurYBkSpn4TW7sSurv4++Q2Ue3m0C0j2ofUaa1Zmw kh8n+66X3HFSjaR3qDLTsFCikDUkx3B01fQ07tCmO9dAX7ldXb5H+0WfM6sLdJS/3pn3 12Dx6X+/Zt0vEJ5s7fANBXB1/5W1lt3UXnE8L98+C6YXOXVeNUrcvEtFN+fe/O+2ideu 4XgXxt6U9/ngoHgmap1W15nyHSkBjVT2jCYrGjNZx2kDoIYQdOI92qtuHzYkxNbqo+vo XaM83rVdTDEGU9eWx18TwukBbMvuvkk56ijtJcfDB4C7wIm/TNLox+EfXNEMCzY/oA5g 4SHw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=f82nA/5BFDwO6pupjIZOwJ9GlU+6ZQ+HGrw+JVIgv/8=; b=UvwHT0OU+DJDf3QhTbd7XHcwBJ4++Tjhc2yBb0tWxm1/KhCoE0PZ39hF9aT6ZHW2NI sRvTwgOBnvKqmog4ASYHlnYj363A/mnEcXeYT4hhf3zwC7AZEGWBbgoNQEx2Xvwb5pFd uj2POfLNssF8fGgeKOgSvjQSIbGKAMaNQDCZ+hMmTxj8ZZGL0XC1DvtM7S/Gq19UwNn2 +RUKFTHLEE3CbO1KUxoOC6TWae41k+JTjUalNhz/9T3ObpYYEtmC26Sy3npT013/esoV M847aPmhFjyJL3X3AC6RPQY9wd7BlOFmUlcoiUwD60XOZ26/1EcQ93HH4AQxZlnHEU0P EKBg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si3515518ple.585.2018.05.16.14.34.39; Wed, 16 May 2018 14:34:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbeEPVd6 (ORCPT + 99 others); Wed, 16 May 2018 17:33:58 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbeEPVd5 (ORCPT ); Wed, 16 May 2018 17:33:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 957711596; Wed, 16 May 2018 14:33:56 -0700 (PDT) Received: from dupont (dupont.austin.arm.com [10.118.16.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E99DC3F589; Wed, 16 May 2018 14:33:55 -0700 (PDT) Date: Wed, 16 May 2018 16:33:55 -0500 From: Kim Phillips To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , Alexander Shishkin , Andi Kleen , David Ahern , Jiri Olsa , Kan Liang , Namhyung Kim , Peter Zijlstra , Wang Nan Subject: Re: [PATCH 01/11] perf tests parse-events: Add intel_pt parse test Message-Id: <20180516163355.d8e4c669ad29d416e9ffb13e@arm.com> In-Reply-To: <20180516144908.22212-2-acme@kernel.org> References: <20180516144908.22212-1-acme@kernel.org> <20180516144908.22212-2-acme@kernel.org> Organization: Arm X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 May 2018 11:48:58 -0300 Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > To avoid regressions such as the one fixed by 4a35a9027f64 ("Revert > "perf pmu: Fix pmu events parsing rule""), where '-e intel_pt//u' got > broken, with this new entry in this 'perf tests' subtest, we would have > caught it before pushing upstream. > > Acked-by: Jiri Olsa > Cc: Adrian Hunter > Cc: Alexander Shishkin > Cc: Andi Kleen > Cc: David Ahern > Cc: Jiri Olsa > Cc: Kan Liang > Cc: Namhyung Kim > Cc: Peter Zijlstra > Cc: Wang Nan > Link: https://lkml.kernel.org/n/tip-kw62fys9bwdgsp722so2ln1l@git.kernel.org > Signed-off-by: Arnaldo Carvalho de Melo > --- This causes a SEGV on Arm, and an Intel box without Intel-PT h/w: (gdb) run test -F -v 6 Starting program: /home/kimphi01/git/linux-perf-acme/tools/perf/perf test -F -v 6 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 6: Parse event definition strings : --- start --- running test 0 'syscalls:sys_enter_openat' Using CPUID GenuineIntel-6-3C running test 51 'L1-dcache-misses/name=cachepmu/' running test 52 'intel_pt//u' Program received signal SIGSEGV, Segmentation fault. __GI___vasprintf_chk (result_ptr=0x8, flags=1, format=, args=args@entry=0x7fffffffbf30) at vasprintf_chk.c:88 88 vasprintf_chk.c: No such file or directory. (gdb) bt #0 __GI___vasprintf_chk (result_ptr=0x8, flags=1, format=, args=args@entry=0x7fffffffbf30) at vasprintf_chk.c:88 #1 0x00007ffff6456e6f in __asprintf_chk (result_ptr=result_ptr@entry=0x8, flags=flags@entry=1, format=format@entry=0x555555992e80 "Cannot find PMU `%s'. Missing kernel support?") at asprintf_chk.c:32 #2 0x0000555555766836 in asprintf (__fmt=0x555555992e80 "Cannot find PMU `%s'. Missing kernel support?", __ptr=0x8) at /usr/include/x86_64-linux-gnu/bits/stdio2.h:178 #3 parse_events_add_pmu (parse_state=parse_state@entry=0x7fffffffdda0, list=list@entry=0x555555e137d0, name=0x5555563e84e0 "intel_pt", head_config=0x0, auto_merge_stats=auto_merge_stats@entry=false, use_alias=use_alias@entry=false) at util/parse-events.c:1236 #4 0x00005555557aaaae in parse_events_parse (_parse_state=_parse_state@entry=0x7fffffffdda0, scanner=0x555555d38c40) at util/parse-events.y:235 #5 0x0000555555761ccf in parse_events__scanner (start_token=258, parse_state=0x7fffffffdda0, str=) at util/parse-events.c:1796 #6 parse_events (evlist=evlist@entry=0x555555d381f0, str=, err=err@entry=0x0) at util/parse-events.c:1836 #7 0x000055555571eb65 in test_event (e=0x555555bf4f80 , e=0x555555bf4f80 ) at tests/parse-events.c:1695 #8 test_events (events=0x555555bf4aa0 , cnt=53) at tests/parse-events.c:1717 #9 test__parse_events (test=, subtest=) at tests/parse-events.c:1837 #10 0x0000555555716a11 in run_test (subtest=-1, test=0x555555bfca78 ) at tests/builtin-test.c:348 #11 test_and_print (t=t@entry=0x555555bfca78 , force_skip=force_skip@entry=false, subtest=subtest@entry=-1) at tests/builtin-test.c:378 #12 0x0000555555717e2f in __cmd_test (skiplist=0x0, argv=0x7fffffffe5c0, argc=1) at tests/builtin-test.c:570 #13 cmd_test (argc=1, argv=0x7fffffffe5c0) at tests/builtin-test.c:709 #14 0x0000555555738b41 in run_builtin (p=0x555555bfd848 , argc=4, argv=0x7fffffffe5c0) at perf.c:303 #15 0x0000555555738e3e in handle_internal_command (argc=4, argv=0x7fffffffe5c0) at perf.c:355 #16 0x00005555556b3901 in run_argv (argcp=, argv=) at perf.c:399 #17 main (argc=, argv=0x7fffffffe5c0) at perf.c:543 (gdb) Thanks, Kim