lkml.org 
[lkml]   [2006]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Linux Kernel Markers 0.7 for 2.6.17 (with type checking!)
Mathieu Desnoyers wrote:
> +#ifdef CONFIG_MARK_SYMBOL
> +#define MARK_SYM(name) \
> + do { \
> + __label__ here; \
> + here: asm volatile \
> + (MARK_KPROBE_PREFIX#name " = %0" : : "m" (*&&here)); \
> + } while(0)
> +#else
> +#define MARK_SYM(name)
> +#endif

BTW, this won't work if you put the MARK_SYM in a loop which gcc
unrolls; you'll only get the mark in the last unrolled iteration
(because the symbol assignments will override each other).

Do make this work properly, you really need to put the mark entries into
a separate section, so that if gcc duplicates the code, you get
duplicated markers too.

J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-22 02:45    [W:0.226 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site