Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3188848imu; Sun, 11 Nov 2018 09:22:13 -0800 (PST) X-Google-Smtp-Source: AJdET5fAjfkPD6l7kZuXNuXGqOtE7LRtAXE7OH4lJwXDDUY1Qc40S5sqJZYkxsvtHDN0ydHu1Bel X-Received: by 2002:a62:114c:: with SMTP id z73-v6mr16556036pfi.192.1541956933145; Sun, 11 Nov 2018 09:22:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541956933; cv=none; d=google.com; s=arc-20160816; b=I4+5tW9OyLg55HwUONpvp7i9ZD8843EjUqMYjgiDo2TaZr64M9Rt5gBbo0BSh0a+78 4WWVhdlNcbQIKrDGFVlDJqtNGJbrGQsPBBbq7dIshyuMfU36IuQEuCVk5ZE8DMFXsIUm gyMR2olBBUwuKRZFDNSE9fqoOqu7+B5ovyPNO4HYlFKwJR1MIi5Z0KWovFJnVyC3BMTL Gp0vn6sBvWrUhIXdeKTXisrWuIbENJ2l/zVLsZkdxAkPpSxTPqu1/zyVlFmp7zpkueFI +NfgnYkmIEsR+1KodXak6yTC0k6xpCoxxgFS9eoR58GkVkh7utczfWkz4mowfnW/S8TJ CSvQ== 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:dkim-signature; bh=7A5Hxuskuia5n3dauskzJ4G6e2kCVcVT+fyVL3ApYZg=; b=gj8J6vc3NpnTdBosDhssRcTD3j16FEDvHvA/shxXEZ9RPh6BHpvxNcAQ/ggOFrLuoi FJieKlKTBDj6DaVUrvzLfZSjgQhrF90rz4sSjrrujtN2W/4DD8YvkoMUqYtAxJkbQRjM kl+FeIuI92AwGg2gaTzYaW9nmTRaUxeGD/5MBlVVc+WVhX+5PycJNnE5Nd+F07TRr83n wQ+939Yskph0hAme8dw5oaK+dDuicXeXKaOlmC1+QewkjtHh1fGn/xvz30ZKQ39+KK4e m5H18on7Oi9Ko+z0gN3Yu6daAd8iO11Lu8tP+xPQpPmhpDmSonTW2pKkCr4Gjk12iiDd j/cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qbhp+uE5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r18si12907798pgo.9.2018.11.11.09.21.57; Sun, 11 Nov 2018 09:22:13 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Qbhp+uE5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729299AbeKLDKX (ORCPT + 99 others); Sun, 11 Nov 2018 22:10:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:34422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729227AbeKLDKX (ORCPT ); Sun, 11 Nov 2018 22:10:23 -0500 Received: from jouet.infradead.org (d66-183-243-195.bchsia.telus.net [66.183.243.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC17E21104; Sun, 11 Nov 2018 17:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541956876; bh=Rp5t7pYW9Tc8IxN/xVSWjZgY6CKbo2fGW6B+fjQXMvE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qbhp+uE5GP2FbSNmC0zoXbhLsBzT5U+NJF2cW7YwIFxPbCQUcl71pt3SmCDhBjq7z 2HsLaY9KV6GsPpNgVc8J439ik0ZtslBFcbAjkBhdBLjNV52rN95kj+w5/DmJW9jKW4 ro89M55lpak2UjMAcnOsbOk/KfEozjW7f23XZmz4= Received: by jouet.infradead.org (Postfix, from userid 1000) id AC3F71443D0; Sun, 11 Nov 2018 09:21:10 -0800 (PST) Date: Sun, 11 Nov 2018 09:21:10 -0800 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Milian Wolff , jolsa@kernel.org, Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH] perf script: share code and output format for uregs and iregs output Message-ID: <20181111172110.GB1111@kernel.org> References: <20181107223437.9071-1-milian.wolff@kdab.com> <20181109081945.GI29732@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181109081945.GI29732@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Nov 09, 2018 at 09:19:45AM +0100, Jiri Olsa escreveu: > On Wed, Nov 07, 2018 at 11:34:37PM +0100, Milian Wolff wrote: > > The iregs output was missing the newline at end as well as the leading > > ABI output. This made it hard to compare the iregs and uregs values. > > Instead, use a single function to output the register values and use > > it for both, iregs and uregs, to ensure the output is consistent. > > > > Before: > > > > ``` > > perf 7049 [-01] 1343.354347: 1 cycles:ppp: > > ffffffffa7bc21ce perf_event_exec+0x18e (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7ead3 setup_new_exec+0xf3 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7cd7be5 load_elf_binary+0x395 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7e540 search_binary_handler+0x80 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7f1aa __do_execve_file.isra.13+0x58a (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7f561 do_execve+0x21 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7f596 __x64_sys_execve+0x26 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7a041cb do_syscall_64+0x5b (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa840008c entry_SYSCALL_64+0x7c (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > AX:0x80000000 BX:0x0 CX:0x0 DX:0x7 SI:0xf DI:0x286 BP:0xffff95bc8213a460 SP:0xffffacbf0ba97d18 IP:0xffffffffa7bc21cd FLAGS:0x28e CS:0x10 SS:0x18 R8:0x2 R9:0x21440 R10:0x33816fb3b8c R11:0x1 R12:0xffff95bc8213a460 R13:0xffff95bc8213a400 R14:0xffff95bc8213a400 R15:0x1 ABI:2 AX:0xffffffffffffffda BX:0xffffffffffffffff CX:0x7f84ad85798b DX:0x560209699d50 SI:0x7ffe2c7a6820 DI:0x7ffe2c7a8c9b BP:0x7ffe2c7a20d0 SP:0x7ffe2c7a2058 IP:0x7f84ad85798b FLAGS:0x206 CS:0x33 SS:0x2b R8:0x7ffe2c7a2030 R9:0x7f84ae55f010 R10:0x8 R11:0x206 R12:0xffffffffffffffff R13:0xffffffffffffffff R14:0xffffffffffffffff R15:0xffffffffffffffff > > > > perf 7049 [-01] 1343.354363: 1 cycles:ppp: > > ... > > ``` > > > > After: > > > > ``` > > perf 7049 [-01] 1343.354347: 1 cycles:ppp: > > ffffffffa7bc21ce perf_event_exec+0x18e (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7ead3 setup_new_exec+0xf3 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7cd7be5 load_elf_binary+0x395 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7e540 search_binary_handler+0x80 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7f1aa __do_execve_file.isra.13+0x58a (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7f561 do_execve+0x21 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7c7f596 __x64_sys_execve+0x26 (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa7a041cb do_syscall_64+0x5b (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ffffffffa840008c entry_SYSCALL_64+0x7c (/lib/modules/4.20.0-rc1perf-devel-05115-gc0bc98f76e39-dirty/build/vmlinux) > > ABI:2 AX:0x80000000 BX:0x0 CX:0x0 DX:0x7 SI:0xf DI:0x286 BP:0xffff95bc8213a460 SP:0xffffacbf0ba97d18 IP:0xffffffffa7bc21cd FLAGS:0x28e CS:0x10 SS:0x18 R8:0x2 R9:0x21440 R10:0x33816fb3b8c R11:0x1 R12:0xffff95bc8213a460 R13:0xffff95bc8213a400 R14:0xffff95bc8213a400 R15:0x1 > > ABI:2 AX:0xffffffffffffffda BX:0xffffffffffffffff CX:0x7f84ad85798b DX:0x560209699d50 SI:0x7ffe2c7a6820 DI:0x7ffe2c7a8c9b BP:0x7ffe2c7a20d0 SP:0x7ffe2c7a2058 IP:0x7f84ad85798b FLAGS:0x206 CS:0x33 SS:0x2b R8:0x7ffe2c7a2030 R9:0x7f84ae55f010 R10:0x8 R11:0x206 R12:0xffffffffffffffff R13:0xffffffffffffffff R14:0xffffffffffffffff R15:0xffffffffffffffff > > Acked-by: Jiri Olsa Thanks, applied. - Arnaldo