* [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c
@ 2009-02-01 4:05 Dennis W. Tokarski
2009-02-01 4:05 ` Dennis W. Tokarski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dennis W. Tokarski @ 2009-02-01 4:05 UTC (permalink / raw)
-----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.
- --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-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltt-tracer.h.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20090131/4d95892a/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltt-tracer.h.patch.sig
Type: application/pgp-signature
Size: 65 bytes
Desc: not available
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20090131/4d95892a/attachment-0003.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c
2009-02-01 4:05 [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c 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
2 siblings, 0 replies; 4+ messages in thread
From: Dennis W. Tokarski @ 2009-02-01 4:05 UTC (permalink / raw)
-----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.
- --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-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltt-tracer.h.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20090131/4d95892a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltt-tracer.h.patch.sig
Type: application/pgp-signature
Size: 65 bytes
Desc: not available
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20090131/4d95892a/attachment-0002.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c
2009-02-01 4:05 [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c 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
2 siblings, 0 replies; 4+ messages in thread
From: Dennis W. Tokarski @ 2009-02-01 4:05 UTC (permalink / raw)
-----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.
- --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-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltt-tracer.h.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20090131/4d95892a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ltt-tracer.h.patch.sig
Type: application/pgp-signature
Size: 65 bytes
Desc: not available
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20090131/4d95892a/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c
2009-02-01 4:05 [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c 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
2 siblings, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2009-02-02 17:07 UTC (permalink / raw)
* 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-02 17:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-01 4:05 [ltt-dev] [PATCH] Fix missing definition of ltt_get_alignment() in kernel/marker.c 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox