Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp470176imu; Fri, 9 Nov 2018 00:20:34 -0800 (PST) X-Google-Smtp-Source: AJdET5cOTo30KEw8dD8+QR2aFyjsp93cR7C3JkXaFFHZ6aUn0XssI6T3Nof30ivZ/MeFotupzkxG X-Received: by 2002:a62:2a04:: with SMTP id q4-v6mr7927660pfq.61.1541751634210; Fri, 09 Nov 2018 00:20:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541751634; cv=none; d=google.com; s=arc-20160816; b=jXD6s8pyITNAcrIbXgzxe2OwaGYxiyzcWeQ25krC1VQ8uRheduey6FzGK4ZF2OOjY/ byABCK5Zqd1P+p1y3BgV34jhh6Y5egi7+lAgzZHuwVpjV2cc+zJW8T2NhAwRZZlicRwx yCgyHu8Arox46Hf23F9eBxIgmsX7oGk44rs6xTtE6XJYM9vDkWD+uKCqBiY+vEyFktmo iCawiUQsZSLndF0inSrYEl0gOsOQ3KGL306SPPyUGmd9Fj+GS8++dRj4KPzs1EuosUTT POSVFp3WSBuDJyl+jKHwnb6fzkcZGRAz7FnGzRLwm0wiIi5+khmwvDJbGdkpgIMgyWQc sw0A== 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=F3HkchRnBIJ1Nj1BdFp5eYoly13x5ATAfCtyxb6Qc6c=; b=hyMcUoi9qcw5/KPDbQhHB/SPG7IuVyFfSQ81vhEftNDqnmWJJxf4LzBbi/CjUlAtmv ejJPtIdwh1gTOYitysE3t7tmSCqKrOHKiV1KhTo3EF7rEuKyvG5qAs0AMFW2VuJsr9P2 XqPsEsFreGnF/lHcesk1Cq6PPTFLwUh2agQzteutzseDgbrsTerkSG7wFUCPCWor3897 3Y9amTBhRG+bVJVH15YQ0aKy2ZNj1WuvlfffirKFu5Imq5/5ov2V4uF3Qb6s0nhbGDu8 Q27sx+i4BiD10UCylhmES28hRSsM3JjkFI6qODXMWqO0/Ir08ZHg+EcfElnr5NTVLVLa elYA== 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 y8-v6si5604376pgp.292.2018.11.09.00.20.18; Fri, 09 Nov 2018 00:20:34 -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 S1728292AbeKIR7S (ORCPT + 99 others); Fri, 9 Nov 2018 12:59:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44956 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727529AbeKIR7S (ORCPT ); Fri, 9 Nov 2018 12:59:18 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5597C307D855; Fri, 9 Nov 2018 08:19:49 +0000 (UTC) Received: from krava (unknown [10.40.205.8]) by smtp.corp.redhat.com (Postfix) with SMTP id C04C5102BCEB; Fri, 9 Nov 2018 08:19:46 +0000 (UTC) Date: Fri, 9 Nov 2018 09:19:45 +0100 From: Jiri Olsa To: Milian Wolff Cc: acme@kernel.org, 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: <20181109081945.GI29732@krava> References: <20181107223437.9071-1-milian.wolff@kdab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181107223437.9071-1-milian.wolff@kdab.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 09 Nov 2018 08:19:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, jirka