Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2293285ybl; Thu, 19 Dec 2019 11:07:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzbu4QIOWGoRcc9RzI0FSgRsoeMPq4U7dNdke5FMru+kI1bKMPqNqNrhpo6G4lNTJG3JIXj X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr9882281otr.167.1576782450145; Thu, 19 Dec 2019 11:07:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576782450; cv=none; d=google.com; s=arc-20160816; b=AivXJJWsKhwLuybiQGn0W7/IuUb4UcD0QpC/wn6Lrj2KR31mdzYTjf9mNvq6NVf4Bj bwgP00MZVMaIhkAToENcs4HSGNeZv3B1vEu0kuOieXUMKafZE41a+YSuqsl1EF/g4GrN 82zlZtFCcke+fcteo8TJvEW7HZcbnsSfvHVuX16tpwIHz6B6AHW3RAzHaCuwDSvRYNdg Ts44ISKQ617eYJiYZrUFtuvH4gLABSHGbmBWzOW3FFosNxgWYgxZh82Mj25sQ+dFLrD3 gEwzu1Sf82L6RPQ6c1XwOToiw9OcaJ7HMXGug83yTNP/mheOBsE+IFl2++Bkfe9mLxZs op6w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=gc5gbChCvrpURcflkEaoPFHEfeyg0nrqPgoXujtCyPI=; b=kbNu0r+MS4QY3AI9AjpzRsqQ/EeDFPqdjuTh0m0U2IMeGqDP1uGFg/ySm4+hyoKZHV h+lk0/HHzjA6fGch6PjOszcSkULujy/R9l+X4PMFLJuOat7fTizM2A+4pRH5oeYYhC7S HbLc69N5mcnWrBA2p+O6Ix+cYdE2fzLSmnqFDr8K+pPgeTjIF94l0WUjpXRPnqXIHNDn 0gJMyvr0YLwoWsMNnzKwy94AFyzezJ413AOvWO0dhtFJhQQGJLFS7zPfCLwkk3OGUg2y IIPs+cRSZx99q/kFNl9N2vULPKTtWWj9IpS12pX15bW/j8l/bSbSS2+j+EWS3WcvEsd8 NnlQ== 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 o129si3529517oib.236.2019.12.19.11.07.17; Thu, 19 Dec 2019 11:07:30 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728849AbfLSSp3 (ORCPT + 99 others); Thu, 19 Dec 2019 13:45:29 -0500 Received: from foss.arm.com ([217.140.110.172]:42266 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729148AbfLSSp2 (ORCPT ); Thu, 19 Dec 2019 13:45:28 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BBE141FB; Thu, 19 Dec 2019 10:45:27 -0800 (PST) Received: from [10.1.194.46] (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D43C93F67D; Thu, 19 Dec 2019 10:45:26 -0800 (PST) Subject: Re: [PATCH] tracing: Fix printing ptrs in preempt/irq enable/disable events To: Antonio Borneo , Joel Fernandes Cc: Steven Rostedt , Ingo Molnar , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, ambroise.vincent@arm.com References: <20191127154428.191095-1-antonio.borneo@st.com> <20191204160407.GB17404@google.com> <6b5b74cede87a61d5f04f2a95bc4389830467fe9.camel@st.com> From: Valentin Schneider Message-ID: <68b3b7db-d278-6cd2-f2b6-cbba05df6db4@arm.com> Date: Thu, 19 Dec 2019 18:45:25 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <6b5b74cede87a61d5f04f2a95bc4389830467fe9.camel@st.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12/2019 00:00, Antonio Borneo wrote: > At login: > trace-cmd record -e preemptirq:irq_enable sleep 1 > trace-cmd report trace.dat | head > and I incorrectly get only the offsets to _stext: > cpus=1 > sleep-197 [000] 280.378022: irq_enable: caller=0x1afaS parent=0xc00091S > sleep-197 [000] 280.378026: irq_enable: caller=0x54d34S parent=0x78e00000S > sleep-197 [000] 280.378029: irq_enable: caller=0x1afaS parent=0xc00a84S > sleep-197 [000] 280.378032: irq_enable: caller=0x263dS parent=0x78e00000S > ... > > With this patch I get the expected/right result: > cpus=1 > sleep-210 [000] 525.177583: irq_enable: caller=trace_hardirqs_on_thunk parent=entry_SYSCALL_64_after_hwframe > sleep-210 [000] 525.177587: irq_enable: caller=__do_page_fault parent=(nil)S > sleep-210 [000] 525.177590: irq_enable: caller=trace_hardirqs_on_thunk parent=swapgs_restore_regs_and_return_to_usermode > sleep-210 [000] 525.177593: irq_enable: caller=do_syscall_64 parent=(nil)S > ... FWIW Ambroise (in Cc) and I were staring at some irq enable/disable traces, and encountered exactly this on a Pixel3 running a mainline kernel. With Antonio's patch we got the expected result, so you can have: Tested-by: Valentin Schneider >> I am not comfortable with this patch at the moment, mainly because it will >> increase the size of this rather high frequency event. But I'm not saying >> there isn't an issue on 32-bit. Let's discuss more. >> > > Sure, the pressure on the trace buffer will increase on a 64 bit system, but in general it also has more memory than an embedded 32 bit system. > The key point is, instead, can we feel safe with a 32 bit offset in a 64 bit system? Is there any guarantee a module is loaded within 32 bits offset from _stext? > You're better placed than I to know if and when this is the case, but I wouldn't use this in a production environment. To me this is more of a debugging tool (and a really good one at that), so I am less concerned about the memory overhead.