All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: dave.anglin@bell.net
Cc: deller@gmx.de, jejb@parisc-linux.org,
	Nathan Chancellor <natechancellor@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	pravin.shedge4linux@gmail.com,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-parisc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions
Date: Wed, 1 Aug 2018 13:52:39 -0700	[thread overview]
Message-ID: <CAKwvOdmdrA+UvAWyqe8sNJt5nxHXHsSwf5Yxih9HYgVL+kovxQ@mail.gmail.com> (raw)
In-Reply-To: <78c667f9-5c8b-3835-83eb-4b59e27e4f7e@bell.net>

Dave, thanks for the quick review!

On Wed, Aug 1, 2018 at 1:10 PM John David Anglin <dave.anglin@bell.net> wrote:
>
> On 2018-08-01 2:22 PM, Nick Desaulniers wrote:
> > As part of the effort to reduce the code duplication between _THIS_IP_
> > and current_text_addr(), let's consolidate callers of
> > current_text_addr() to use _THIS_IP_.
> Using the generic _THIS_IP_ results in significantly longer code than
> the parisc implementation
> of current_text_addr().

It might be worthwhile to file a bug with your compiler vendor.  It
seems like there may be a better way to generate code for this
construct.

Also, I'm curious how hot this code is? I assume in general that the C
construct may be larger than the inline assembly, but I'm curious if
this introduces a performance regression or just makes the code
larger?  Do you have stats on the size difference and performance
differences?  What's more important to me is whether the patch is
correct...

> It also results in a local label in the text.
> This breaks the unwind data
> for the function with the label in 32-bit kernels.  The implementation
> of current_text_addr()
> doesn't add a label.

... oh, I guess I'm surprised that the label ends up in the code, vs
there just being a constant generated.  Can you send me the
disassembly?  Also, I'm curious how does having the label present in
the text break the unwinder?  (I'm not familiar with how unwinding
works beyond following frame pointers).

> _THIS_IP_ should be defined using
> current_text_addr() on parisc.

I'm trying to eliminate current_text_addr() in the kernel, as it only
has 4 call sites (3 are arch specific).  What are your thoughts on
making the current parisc current_text_addr() just a static function
(or statement expression that's local to) in
arch/parisc/kernel/unwind.c?

-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2018-08-01 20:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 18:22 [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions Nick Desaulniers
2018-08-01 20:10 ` John David Anglin
2018-08-01 20:52   ` Nick Desaulniers [this message]
2018-08-01 21:27     ` John David Anglin
2018-08-01 21:49       ` Nick Desaulniers
2018-08-01 22:12         ` John David Anglin
2018-08-01 22:18           ` Nick Desaulniers
2018-08-02  0:49             ` John David Anglin
2018-08-02 20:31               ` Nick Desaulniers
2018-08-03 17:57                 ` John David Anglin
2018-08-03 18:11                   ` Nick Desaulniers
2018-08-03 19:09                     ` John David Anglin
2018-08-03 20:33                       ` Nick Desaulniers
2018-08-03 22:34                         ` Helge Deller
2018-08-07 18:11                           ` Nick Desaulniers
2018-08-07 20:30                             ` Helge Deller
2018-08-07 21:29                               ` Nick Desaulniers

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=CAKwvOdmdrA+UvAWyqe8sNJt5nxHXHsSwf5Yxih9HYgVL+kovxQ@mail.gmail.com \
    --to=ndesaulniers@google.com \
    --cc=dave.anglin@bell.net \
    --cc=deller@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jejb@parisc-linux.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=pravin.shedge4linux@gmail.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.