From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c
Date: Mon, 2 Feb 2009 12:07:00 -0500 [thread overview]
Message-ID: <20090202170700.GB6256@Krystal> (raw)
In-Reply-To: <49851F93.30406@PolTec.COM>
* Dennis W. Tokarski (dwt at PolTec.COM) wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> While looking into problems taking a trace on a dual cpu qemu-i386 VM,
> I decided to try a kernel which had ltt turned off in the configuration
> but was otherwise the same.
>
> This left me with ltt off but markers still on, and kernel/markers.c
> wouldn't build because several of the *trace_mark() calls use
> ltt_get_alignment() as an argument. Its definition in ltt-tracer.h
> is entirely enclosed within the #ifdef CONFIG_LLT...#endif. I propose
> to move it outside. Patch attached.
>
Merged, thanks !
Mathieu
> - --Dennis
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFJhR+DDJucIzCImrURAgGLAJ9W7r7hLS5rVvdy/uXLPM05Vk0g6gCgoVi0
> 7b/k63xy5k0SHbx3KJaBSD8=
> =OGm/
> -----END PGP SIGNATURE-----
> Index: include/linux/ltt-tracer.h
> ===================================================================
> RCS file: /usr/src/cvs-repository/fedora/fc10-kernel/include/linux/Attic/ltt-tracer.h,v
> retrieving revision 1.1.2.1
> diff -u -r1.1.2.1 ltt-tracer.h
> --- include/linux/ltt-tracer.h 26 Jan 2009 01:12:29 -0000 1.1.2.1
> +++ include/linux/ltt-tracer.h 1 Feb 2009 03:20:09 -0000
> @@ -138,6 +138,41 @@
> return MARKER_ID_DYNAMIC;
> }
>
> +#if defined(CONFIG_LTT) && defined(CONFIG_LTT_ALIGNMENT)
> +
> +/*
> + * Calculate the offset needed to align the type.
> + * size_of_type must be non-zero.
> + */
> +static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type)
> +{
> + size_t alignment = min(sizeof(void *), size_of_type);
> + return (alignment - align_drift) & (alignment - 1);
> +}
> +/* Default arch alignment */
> +#define LTT_ALIGN
> +
> +static inline int ltt_get_alignment(void)
> +{
> + return sizeof(void *);
> +}
> +
> +#else
> +
> +static inline unsigned int ltt_align(size_t align_drift,
> + size_t size_of_type)
> +{
> + return 0;
> +}
> +
> +#define LTT_ALIGN __attribute__((packed))
> +
> +static inline int ltt_get_alignment(void)
> +{
> + return 0;
> +}
> +#endif /* CONFIG_LTT_ALIGNMENT */
> +
> #ifdef CONFIG_LTT
>
> struct user_dbg_data {
> @@ -300,41 +335,6 @@
> uint8_t header_end[0]; /* End of header */
> };
>
> -#ifdef CONFIG_LTT_ALIGNMENT
> -
> -/*
> - * Calculate the offset needed to align the type.
> - * size_of_type must be non-zero.
> - */
> -static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type)
> -{
> - size_t alignment = min(sizeof(void *), size_of_type);
> - return (alignment - align_drift) & (alignment - 1);
> -}
> -/* Default arch alignment */
> -#define LTT_ALIGN
> -
> -static inline int ltt_get_alignment(void)
> -{
> - return sizeof(void *);
> -}
> -
> -#else
> -
> -static inline unsigned int ltt_align(size_t align_drift,
> - size_t size_of_type)
> -{
> - return 0;
> -}
> -
> -#define LTT_ALIGN __attribute__((packed))
> -
> -static inline int ltt_get_alignment(void)
> -{
> - return 0;
> -}
> -#endif /* CONFIG_LTT_ALIGNMENT */
> -
> /**
> * ltt_subbuffer_header_size - called on buffer-switch to a new sub-buffer
> *
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
prev parent reply other threads:[~2009-02-02 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-01 4:05 Dennis W. Tokarski
2009-02-01 4:05 ` Dennis W. Tokarski
2009-02-01 4:05 ` Dennis W. Tokarski
2009-02-02 17:07 ` Mathieu Desnoyers [this message]
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=20090202170700.GB6256@Krystal \
--to=compudj@krystal.dyndns.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