[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v3 5/5] xen: modify several static locks to unique names
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Juergen Gross <jgross@xxxxxxxx>
- Date: Wed, 4 Sep 2019 07:08:34 +0200
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Wed, 04 Sep 2019 05:08:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 03.09.19 17:09, Jan Beulich wrote:
On 03.09.2019 17:03, Juergen Gross wrote:
On 03.09.19 16:53, Jan Beulich wrote:
On 29.08.2019 12:18, Juergen Gross wrote:
In order to have unique names when doing lock profiling several local
locks "lock" need to be renamed.
But these are all named simply "lock" for a good reason, including
because they're all function scope symbols (and typically the
functions are all sufficiently short). The issue stems from the
dual use of "name" in
#define _LOCK_PROFILE(name) { 0, #name, &name, 0, 0, 0, 0, 0 }
so I'd rather suggest making this a derivation of a new
#define _LOCK_PROFILE_NAME(lock, name) { 0, #name, &lock, 0, 0, 0, 0, 0 }
if there's no other (transparent) way of disambiguating the names.
This will require to use a different DEFINE_SPINLOCK() variant, so e.g.
DEFINE_SPINLOCK_LOCAL(), which will then include the needed "static" and
add "@<func>" to the lock profiling name. Is this okay?
To be frank - not really. I dislike both, and would hence prefer to
stick to what there is currently, until someone invents a transparent
way to disambiguate these. I'm sorry for being unhelpful here.
NP with me. It was Andrew who asked for a way to differentiate between
multiple locks. I'm not depending in any way on this patch.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|