Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp464158imu; Fri, 9 Nov 2018 00:12:28 -0800 (PST) X-Google-Smtp-Source: AJdET5dWnqTpXmHAYi5k7WM05YtoU6b/T9COS5vgGo1jof7KT3DNUaxAc2UDaAAthdbjhXK0PQYZ X-Received: by 2002:a62:3501:: with SMTP id c1-v6mr7951066pfa.173.1541751148000; Fri, 09 Nov 2018 00:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541751147; cv=none; d=google.com; s=arc-20160816; b=xjrWHWmB6o5hjPUqpJPL5XkxoPdQTBIQ5iaBKU9Mtcey/RxfeBuUF8QoWOi5+UU5Nf nU52qLkoYThiW5nbjGtgHh2gPAwvaQwsLJAFBv1mZD1nP0WiE+7kbjRCVKkTDPcQP7vp WWL8adqCQdUz+r4XSRjppEdin2AcbGK+f/fXNET91DlaVqHwX+3OA0BaVe6vTPq5RUhk GPmnVMey130MBgbmLtaApuOOhs3xn+Z4WaD3Bkttwtd5+ihaMBgZGQ5+L13UGM3G/O3V 2peAWUO/0gSMPzEVhbcJJBLkBXGmQYn5gRBB58r+0R5paWrBLDWHThz7WZ4+n3WMx00+ O3Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QgAuximE/waU6//t5WhYvI5uFvn/bjTRbuNsNWpv+nI=; b=RjDKT2FNSpkN0EMQHOXijno/6H5u4VRkvRkG0tn7r5VwBUBnwOsYEKJsCt8GqjTu/A vA3kCo9hYJ56YO/SF4bM7tpvoiO1eG85zRxxu3DBvE6i7CjYpCzrgPJ/u9qOGq+jve67 r+rlGrCUf6V/3M0tODNqHrk9zmlhdKw9It1/3JDEO2TWv7onjrGkn/7rMGaPOf2I6i5c f57Xm5Bjqcn+sW6UDu2HlvBDZHECWc/JYOMdtN418YfPBr40CxBBxJqIyIE2ySgF0cHx t5ShIv3Qm73TwUYxGUeSfuOCPhItFMoFo76+UfEYJdc02sr6L07/1NIkaeuYCD7bPkTL Rqgg== 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; dmarc=fail (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 g8-v6si6739444plt.434.2018.11.09.00.12.12; Fri, 09 Nov 2018 00:12:27 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728430AbeKIRvL (ORCPT + 99 others); Fri, 9 Nov 2018 12:51:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44256 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727519AbeKIRvL (ORCPT ); Fri, 9 Nov 2018 12:51:11 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45B129981B; Fri, 9 Nov 2018 08:11:45 +0000 (UTC) Received: from krava (unknown [10.40.205.8]) by smtp.corp.redhat.com (Postfix) with SMTP id 5902319492; Fri, 9 Nov 2018 08:11:43 +0000 (UTC) Date: Fri, 9 Nov 2018 09:11:42 +0100 From: Jiri Olsa To: leo.yan@linaro.org Cc: acme@redhat.com, Jiri Olsa , Mathieu Poirier , Coresight ML , linux-kernel@vger.kernel.org Subject: Re: Question: perf dso support for /proc/kallsyms Message-ID: <20181109081142.GH29732@krava> References: <20181102025516.GA25374@leoy-ThinkPad-X240s> <20181107141006.GD12870@krava> <20181108085152.GA1925@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181108085152.GA1925@leoy-ThinkPad-X240s> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 09 Nov 2018 08:11:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 08, 2018 at 04:51:52PM +0800, leo.yan@linaro.org wrote: > Hi Jiri, > > On Wed, Nov 07, 2018 at 03:10:06PM +0100, Jiri Olsa wrote: > > On Fri, Nov 02, 2018 at 10:55:16AM +0800, leo.yan@linaro.org wrote: > > > Hi all, > > > > > > Now I found that if use the command 'perf script' for Arm CoreSight trace > > > data, it fails to parse kernel symbols if we don't specify kernel vmlinux > > > file. So when we don't specify kernel symbol files then perf tool will > > > roll back to use /proc/kallsyms for kernel symbols parsing, as result it will > > > run into below flow: > > > > yep, AFAIK if there's no vmlinux found we fallback to /proc/kallsyms > > > > > > > > thread__find_addr_map(thread, cpumode, MAP__FUNCTION, address, &al); > > > map__load(al.map); > > > dso__data_read_offset(al.map->dso, machine, offset, buffer, size); > > > `-> data_read_offset() > > > > so what is the actual error you see in the perf script? > > unresolved samples? could you please describe your config > > and workload? > > So at my side the error is the CoreSight trace decoder fails to > generate samples if the sample has kernel address, thus the decoder > doesn't generate any kernel sample if use kallsyms as dso. > > For more detailed info is: the CoreSight decoder needs firstly to get > dso related info by calling dso__data_read_offset() [1], if we use > kallsyms then this function always returns failure then this leads the > docoder to discard all kernel samples. I haven't checked on this code for some time but AFAICS before you call dso__data_read_offset you need to check dso->data.status != DSO_DATA_STATUS_ERROR map__load call ahead should take care on setting this and find the source of the data check the intel_pt code (intel_pt_walk_next_insn) or for example grab_bb in perf script I guess you need to have either vmlinux or kcore in place to get some data out of it jirka