From: Daniel Walker <dwalker@mvista.com>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: lkml <linux-kernel@vger.kernel.org>, Hua Zhong <hzhong@gmail.com>,
akpm@linux-foundation.org
Subject: Re: [PATCH v1] change likeliness accounting
Date: Fri, 14 Mar 2008 13:26:23 -0700 [thread overview]
Message-ID: <1205526383.10894.119.camel@localhost.localdomain> (raw)
In-Reply-To: <47D9B35C.9@tiscali.nl>
On Fri, 2008-03-14 at 00:06 +0100, Roel Kluin wrote:
> #define __check_likely(exp, is_likely) \
> ({ \
> static struct likeliness likeliness = { \
> - .func = __func__, \
> - .file = __FILE__, \
> - .line = __LINE__, \
> - .type = is_likely | LP_UNSEEN, \
> + .label = __LINE__ << LP_LINE_SHIFT | \
> + LP_UNSEEN | is_likely, \
> }; \
> - do_check_likely(&likeliness, !!(exp)); \
> + \
> + if (likeliness.label & LP_UNSEEN) \
> + do_check_likely(&likeliness); \
On second look, your actually break even on size (if not a little worse)
cause you adding some addition code into the macro which effectively
inlines it at all the likely/unlikely locations .. I'm not sure that's
really necessary ..
Also by not including the file name you have situation like the
following,
+unlikely | 208324| 4010128| do_sys_open+0x2a/0xb2()@:34
Where do_sys_open is on line 1076 in file fs/open.c , but the likely
location is actual on like 34 in file include/linux/err.h ..
So I think saving of the EIP does help in finding the actually caller,
but I do think we loose something by removing the file name..
Daniel
next prev parent reply other threads:[~2008-03-14 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 23:06 Roel Kluin
2008-03-14 19:53 ` Daniel Walker
2008-03-14 20:26 ` Daniel Walker [this message]
2008-03-17 2:45 ` Nick Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1205526383.10894.119.camel@localhost.localdomain \
--to=dwalker@mvista.com \
--cc=12o3l@tiscali.nl \
--cc=akpm@linux-foundation.org \
--cc=hzhong@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®