mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: compudj@krystal.dyndns.org
Cc: mbligh@google.com, fche@redhat.com,
	masami.hiramatsu.pt@hitachi.com, prasanna@in.ibm.com,
	akpm@osdl.org, mingo@elte.hu, mathieu.desnoyers@polymtl.ca,
	lethal@linux-sh.org, linux-kernel@vger.kernel.org, jes@sgi.com,
	zanussi@us.ibm.com, richardj_moore@uk.ibm.com,
	michel.dagenais@polymtl.ca, hch@infradead.org, gregkh@suse.de,
	tglx@linutronix.de, wcohen@redhat.com, ltt-dev@shafik.org,
	systemtap@sources.redhat.com, alan@lxorguk.ukuu.org.uk,
	jeremy@goop.org, karim@opersys.com, pavel@suse.cz,
	joe@perches.com, rdunlap@xenotime.net, jrs@us.ibm.com
Subject: Re: [PATCH] Linux Kernel Markers 0.20 for 2.6.17
Date: Wed, 18 Oct 2006 00:51:22 +0900 (JST)	[thread overview]
Message-ID: <20061018.005122.07644172.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <20060930180443.GB25761@Krystal>

On Sat, 30 Sep 2006 14:04:43 -0400, Mathieu Desnoyers <compudj@krystal.dyndns.org> wrote:
> +#define MARK(name, format, args...) \
> +	do { \
> +		static marker_probe_func *__mark_call_##name = \
> +					__mark_empty_function; \
> +		volatile static char __marker_enable_##name = 0; \
> +		static const struct __mark_marker_c __mark_c_##name \
> +			__attribute__((section(".markers.c"))) = \
> +			{ #name, &__mark_call_##name, format } ; \
> +		static const struct __mark_marker __mark_##name \
> +			__attribute__((section(".markers"), unused)) = \
> +			{ &__mark_c_##name, &__marker_enable_##name } ; \
> +		if (unlikely(__marker_enable_##name)) { \
> +			preempt_disable(); \
> +			(*__mark_call_##name)(format, ## args); \
> +			preempt_enable_no_resched(); \
> +		} \
> +	} while(0)

When I compiled this with gcc 4.1.1 (mips), ".markers" section was
empty.

I suppose "unused" attribute is not suitable for modern gcc.  Maybe
__attribute_used__ should be used?

The __attrribute_used__ is defined in compiler-gcc3.h as:

#if __GNUC_MINOR__ >= 3
# define __attribute_used__	__attribute__((__used__))
#else
# define __attribute_used__	__attribute__((__unused__))
#endif

---
Atsushi Nemoto

  reply	other threads:[~2006-10-17 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-30 18:04 Mathieu Desnoyers
2006-10-17 15:51 ` Atsushi Nemoto [this message]
2006-10-17 18:36   ` Jeremy Fitzhardinge
2006-10-17 19:19     ` Mathieu Desnoyers
2006-10-17 19:39       ` Jeremy Fitzhardinge

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=20061018.005122.07644172.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=compudj@krystal.dyndns.org \
    --cc=fche@redhat.com \
    --cc=gregkh@suse.de \
    --cc=hch@infradead.org \
    --cc=jeremy@goop.org \
    --cc=jes@sgi.com \
    --cc=joe@perches.com \
    --cc=jrs@us.ibm.com \
    --cc=karim@opersys.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltt-dev@shafik.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mbligh@google.com \
    --cc=michel.dagenais@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=pavel@suse.cz \
    --cc=prasanna@in.ibm.com \
    --cc=rdunlap@xenotime.net \
    --cc=richardj_moore@uk.ibm.com \
    --cc=systemtap@sources.redhat.com \
    --cc=tglx@linutronix.de \
    --cc=wcohen@redhat.com \
    --cc=zanussi@us.ibm.com \
    /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®