From: Denys Vlasenko <vda.linux@googlemail.com>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [patch for 2.6.26 0/7] Architecture Independent Markers
Date: Fri, 28 Mar 2008 01:01:29 +0100 [thread overview]
Message-ID: <200803280101.30026.vda.linux@googlemail.com> (raw)
In-Reply-To: <20080327132057.449831367@polymtl.ca>
On Thursday 27 March 2008 14:20, Mathieu Desnoyers wrote:
> Hi Andrew,
>
> After a few RFC rounds, I propose these markers for 2.6.26. They include
> work done after comments from the memory management community. Most of them have
> been used by the LTTng project for about 2 years.
Not in this patch, but I noticed:
#define __trace_mark(name, call_private, format, args...) \
do { \
static const char __mstrtab_##name[] \
__attribute__((section("__markers_strings"))) \
= #name "\0" format; \
static struct marker __mark_##name \
__attribute__((section("__markers"), aligned(8))) = \
{ __mstrtab_##name, &__mstrtab_##name[sizeof(#name)], \
0, 0, marker_probe_cb, \
{ __mark_empty_function, NULL}, NULL }; \
__mark_check_format(format, ## args); \
if (unlikely(__mark_##name.state)) { \
(*__mark_##name.call) \
(&__mark_##name, call_private, \
format, ## args); \
} \
} while (0)
In this call:
(*__mark_##name.call) \
(&__mark_##name, call_private, \
format, ## args); \
you make gcc allocate duplicate format string. You can use
&__mstrtab_##name[sizeof(#name)] instead since it holds the same string,
or drop ", format," above and "const char *fmt" from here:
void (*call)(const struct marker *mdata, /* Probe wrapper */
void *call_private, const char *fmt, ...);
since mdata->format is the same and all callees which need it can take it there.
--
vda
next prev parent reply other threads:[~2008-03-28 0:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 13:20 [patch for 2.6.26 0/7] Architecture Independent Markers Mathieu Desnoyers
2008-03-27 13:20 ` [patch for 2.6.26 1/7] Markers - define non optimized marker Mathieu Desnoyers
2008-03-27 13:20 ` [patch for 2.6.26 2/7] LTTng instrumentation fs Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 3/7] LTTng instrumentation ipc Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 4/7] LTTng instrumentation kernel Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 5/7] LTTng instrumentation mm Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 6/7] LTTng instrumentation net Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 7/7] LTTng instrumentation - lib Mathieu Desnoyers
2008-03-27 15:40 ` [patch for 2.6.26 0/7] Architecture Independent Markers Ingo Molnar
2008-03-27 17:08 ` KOSAKI Motohiro
2008-03-28 10:15 ` Ingo Molnar
2008-03-28 13:34 ` [OT] " Masami Hiramatsu
2008-04-01 1:43 ` Denys Vlasenko
2008-04-01 14:30 ` Masami Hiramatsu
2008-03-28 13:40 ` Frank Ch. Eigler
2008-03-28 14:18 ` Ingo Molnar
2008-03-28 14:41 ` Ingo Molnar
2008-03-28 15:31 ` Frank Ch. Eigler
2008-03-27 20:39 ` Mathieu Desnoyers
2008-03-28 9:43 ` Ingo Molnar
2008-03-28 11:22 ` Ingo Molnar
2008-03-28 11:38 ` Mathieu Desnoyers
2008-03-28 13:33 ` Ingo Molnar
2008-03-29 17:16 ` Mathieu Desnoyers
2008-03-27 21:49 ` Frank Ch. Eigler
2008-03-28 0:01 ` Denys Vlasenko [this message]
2008-03-28 1:02 ` [PATCH] Markers - remove extra format argument Mathieu Desnoyers
2008-03-28 5:35 ` Masami Hiramatsu
2008-03-28 1:04 ` [patch for 2.6.26 1/7] Markers - define non optimized marker (updated) Mathieu Desnoyers
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=200803280101.30026.vda.linux@googlemail.com \
--to=vda.linux@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
/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