Received: by 10.192.165.156 with SMTP id m28csp1182695imm; Mon, 16 Apr 2018 15:49:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+u4RtrP4Pj0cq2TJe/4jIM3FjEUooGp6RvLDDxeLLJY3k8DG/MSKCzkpU8Y9s79ommrkmP X-Received: by 10.101.100.130 with SMTP id e2mr14002852pgv.301.1523918987130; Mon, 16 Apr 2018 15:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523918987; cv=none; d=google.com; s=arc-20160816; b=qPeH2aFsEPmiV/WIPSO30ZEbNCzjmhT6nKivJ45em6SqGAtVA8R8vVJafuHgm2pmAx U/kkpYYax/dWAhBx1TGLhm2D5DoVpVacVSrOyio3ho2NS+YNfCyfVYLncJGI34qLZWbY 54VuU1P/JqKLpCDqcdJNNJDk+Oz2sVCv6u550gw2F5Y4pxE7N9nOVyaLKB5fA3S+jGbr CnjO5sDHwe8JAg5IyYUIbQmffqnzICK8ZludUYZFF2itcMj2fa4m14sp+7bPDxs9CfW7 rfjEC4ZWnOFc9fd41cPOftX0MM8ADgqGC2V+Ku9Id2ZwKxZ4XL71WCnRw7IEeao0y2pq s8FQ== 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=6O3aGSXxWYVLKdZUKUxFKTujOqh5I1WZmmmmpKoL8Kk=; b=DOsGeeuxt3JVWsitoU6v22dvOzVUq6LnBP0XkOeye5WojxI89BhgJGgvLN90cadAJr SV+geClUu2gNzBhY+UEQYIjm50E/BJi9/voRqL7couQE5GApHNllw2wsoJj8cniAweoJ DHLourH0XoY0ceTzbUUn2mW6bvTF8qJBYnltoCtxOSUaRpkF/1YwjqDti6qYoMqpSVbd qaJ0utPjDI5f/MWV4hi78D95ewEShxFQpHQ7MHkX31lswUDP9gAMwl7Fcbwo2BtIz42/ VAYRk3QqUw37Fmb98x3W7907DgGLnkL6HaWv74gLVepBguPBMc3S2Gz45pcFjHsK0arS 3z4w== 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 j73si10451568pgc.142.2018.04.16.15.49.32; Mon, 16 Apr 2018 15:49:47 -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 S1752876AbeDPWsO (ORCPT + 99 others); Mon, 16 Apr 2018 18:48:14 -0400 Received: from foss.arm.com ([217.140.101.70]:37044 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972AbeDPWsN (ORCPT ); Mon, 16 Apr 2018 18:48:13 -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 EC5851435; Mon, 16 Apr 2018 15:48:12 -0700 (PDT) Received: from dupont (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B1DA3F59D; Mon, 16 Apr 2018 15:48:12 -0700 (PDT) Date: Mon, 16 Apr 2018 17:48:11 -0500 From: Kim Phillips To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Subject: Re: [PATCH] perf tools: set kernel end address properly Message-Id: <20180416174811.1aca9106364effe435f363c8@arm.com> In-Reply-To: <20180416122407.0d90863b69fed80166384850@arm.com> References: <20180416042240.21528-1-namhyung@kernel.org> <20180416092345.GA23274@krava> <20180416135125.GA23802@kernel.org> <20180416110730.1dd12801e43be66ea5d0cc48@arm.com> <20180416165800.GD3202@kernel.org> <20180416122407.0d90863b69fed80166384850@arm.com> Organization: Arm X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; 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 Mon, 16 Apr 2018 12:24:07 -0500 Kim Phillips wrote: > On Mon, 16 Apr 2018 13:58:00 -0300 > Arnaldo Carvalho de Melo wrote: > > > Em Mon, Apr 16, 2018 at 11:07:30AM -0500, Kim Phillips escreveu: > > > On Mon, 16 Apr 2018 10:51:25 -0300 > > > Arnaldo Carvalho de Melo wrote: > > > > > > > Em Mon, Apr 16, 2018 at 11:23:45AM +0200, Jiri Olsa escreveu: > > > > > On Mon, Apr 16, 2018 at 01:22:40PM +0900, Namhyung Kim wrote: > > > > > > The map_groups__fixup_end() was called to set end addresses of kernel > > > > > > map and module maps. But now machine__create_modules() is set the end > > > > > > address of modules properly so the only remaining piece is the kernel > > > > > > map. We can set it with adjacent module's address directly instead of > > > > > > calling the map_groups__fixup_end(). If there's no module after the > > > > > > kernel map, the end address will be ~0ULL. > > > > > > > > I wonder if it wouldn't be better to have it as last symbol + PAGE_SIZE > > > > or something like that... > > > > > > > > But, anyway, Kim, does this fix things for you? Can I have your > > > > Tested-by? > > > > > > No, perf test 1 still fails: > > > > > > vmlinux symtab matches kallsyms: FAILED! > > > > Ok, -vv please > > a perf/urgent from last week (commit 918965d4897) + this patch: > > $ sudo ./perf test -vv 1 |& head > 1: vmlinux symtab matches kallsyms : > --- start --- > test child forked, pid 6194 > Looking at the vmlinux_path (8 entries long) > Using /lib/modules/4.16.0+/build/vmlinux for symbols > ERR : 0xffff200008081000: do_undefinstr not on kallsyms > ERR : 0xffff2000080810b8: do_sysinstr not on kallsyms > ERR : 0xffff200008081258: do_debug_exception not on kallsyms > ERR : 0xffff200008081648: do_mem_abort not on kallsyms > ERR : 0xffff2000080818b8: do_el0_irq_bp_hardening not on kallsyms > $ sudo ./perf test -vv 1 |& tail > ERR : 0xffff20000a1d37c8: tramp_exit_native not on kallsyms > ERR : 0xffff20000a1d37e8: tramp_exit_compat not on kallsyms > ERR : 0xffff20000a1d4000: __entry_tramp_text_end not on kallsyms > WARN: Maps only in vmlinux: > ffff200008080000-ffff200008081000 10000 [kernel].head.text > ffff20000aec0000-ffff20000aff7548 2e50000 [kernel].init.text > ffff20000aff7548-ffff20000b0126d4 2f87548 [kernel].exit.text > test child finished with -1 > ---- end ---- > vmlinux symtab matches kallsyms: FAILED! this patch's advertised "If there's no module after the kernel map, the end address will be ~0ULL." doesn't seem to be working: the value it gets for 'end' is 0xffff200008080000. I even hardcoded 'end' variable to the value for '_end' in kallsyms prior to the machine__set_kernel_mmap() call, and test 1 still fails. The problem is earlier on in the code, somewhere. I've moved to working on the updated perf/urgent. Reverting the original patch doesn't make test 1 resume succeeding anymore. Pointers appreciated. Kim