[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2.1 RFC 17/12] xen/trace: Drop cycles parameter
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 22 Sep 2021 09:03:56 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8hA5CF9k5Gw3YJIJbxUjLGQqn3qkUPNgnAZHoFImazg=; b=G0davBIf97SZ7w6dH0j8W1sEuvVgnnQ683CTYZOGkYzRAaao6RD6VwaZz18EjyNokzzudXOXhs/L6BHfjmbtnusR19y/gaueUItRRvWCruuPf2eM1OzybHfGopjVkG1QAF2uzG0WPsAfrmkCVvqNRHRjPPaHx2NtXIUyVs5djwAFro2tL7quSasPLr09lFrNFqiqfsaIgskjID64N6VWTNFYCCg+MdZgGFhqFa4yfKYkfgd+33OIrXHp5tp0CPUGEDQkvmHqt9VYe3zXnJ2ufCuyB2/vHTlRrAe9OWzxFyWW/AeZzp5SIlogn8zZwe4VGu/QuYScg/SoCnzA+LXi2A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CiF0oMptAdRe/DUtPbfN2RRedCYGfH3pWoqTkKpCiY6kXoK9MMiRbLd0b/chJbzb2Wb3wGYtjzs8VevtXcdAU5j3WGRCtbLxHTlSUyCXqZglGHY4oti9848rWvubvZPqeIwekrt57SLgg+ZavvN7BkwA0RIonPcsiOTcHrZ0Zgy4MlXaL2pc/2T1GT4jimo7zz2EhFzYn0XBAtK49nE3S2kkUXkQvF79K1JCa9K3p8aK1mGb3dxiiNvXPTT+cHXAXWjD2oLnA2UVldNZm/tk1vhfEzCnG6jvM04okQwJ5wxRC0JXbmBDj7Ft90Nc9FHEWGMTGngybF4iJy5Y3xSl6A==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Meng Xu <mengxu@xxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 22 Sep 2021 07:04:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 21.09.2021 22:08, Andrew Cooper wrote:
> Not a patch, but an RFC idea for one...
>
> It occurred to me that the cycles parameter from __trace_var() and
> friends is pointless, as the cycles bit is encoded in the top bit of the
> event field anyway, and passed in the adjacent parameter.
>
> Dropping the cycles parameter results in +85/-1029 (-944) net change.
>
> The common change in callers is e.g. from:
>
> lea 0x3c(%rsp),%rcx
> mov $0x4,%edx
> mov $0x1,%esi
> mov $0x10f002,%edi
> mov %ebp,0x3c(%rsp)
> callq ffff82d04022ea20 <__trace_var>
>
> to this:
>
> lea 0x3c(%rsp),%rdx
> mov $0x4,%esi
> mov $0x8010f002,%edi
> mov %ebp,0x3c(%rsp)
> callq ffff82d04022ea20 <__trace_var>
>
>
> Just sprinkling "| TRC_HD_CYCLE_FLAG" over the place makes things a
> little bit unwieldy.
>
> Instead, I was thinking of implementing trace() (and a thin trace_time()
> wrapper) mirroring the "new API" in patch 14. Half of the trace_var()
> users should be __trace_var() already because of living inside a
> tb_init_done conditional, and the rest are actually opencoded TRACE()
> taking no extra data.
>
> Thoughts?
Sounds quite reasonable to me.
Jan
|