[patch 26/26] Linux Kernel Markers - Use Immediate Values

Previous thread: [patch 25/26] Immediate Values Use Arch NMI and MCE Support by Mathieu Desnoyers on Thursday, January 24, 2008 - 4:27 pm. (1 message)

Next thread: [patch 07/26] Add INIT_ARRAY() to kernel.h by Mathieu Desnoyers on Thursday, January 24, 2008 - 4:27 pm. (14 messages)
To: <akpm@...>, Ingo Molnar <mingo@...>, <linux-kernel@...>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...>
Date: Thursday, January 24, 2008 - 4:27 pm

Make markers use immediate values.

Changelog :
- Use imv_* instead of immediate_*.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
Documentation/markers.txt | 17 +++++++++++++----
include/linux/marker.h | 42 ++++++++++++++++++++++++++++++++----------
kernel/marker.c | 8 ++++++--
kernel/module.c | 1 +
4 files changed, 52 insertions(+), 16 deletions(-)

Index: linux-2.6-lttng.mm/include/linux/marker.h
===================================================================
--- linux-2.6-lttng.mm.orig/include/linux/marker.h 2008-01-24 14:40:50.000000000 -0500
+++ linux-2.6-lttng.mm/include/linux/marker.h 2008-01-24 14:44:30.000000000 -0500
@@ -12,6 +12,7 @@
* See the file COPYING for more details.
*/

+#include <linux/immediate.h>
#include <linux/types.h>

struct module;
@@ -42,7 +43,7 @@ struct marker {
const char *format; /* Marker format string, describing the
* variable argument list.
*/
- char state; /* Marker state. */
+ DEFINE_IMV(char, state);/* Immediate value state. */
char ptype; /* probe type : 0 : single, 1 : multi */
void (*call)(const struct marker *mdata, /* Probe wrapper */
void *call_private, const char *fmt, ...);
@@ -53,13 +54,14 @@ struct marker {
#ifdef CONFIG_MARKERS

/*
+ * Generic marker flavor always available.
* Note : the empty asm volatile with read constraint is used here instead of a
* "used" attribute to fix a gcc 4.1.x bug.
* Make sure the alignment of the structure in the __markers section will
* not add unwanted padding between the beginning of the section and the
* structure. Force alignment to the same alignment as the section start.
*/
-#define __trace_mark(name, call_private, format, args...) \
+#define __trace_mark(generic, name, call_private, format, args...) \
do { \
static const char __mstrtab_##name[] \
__attribute__((section("__markers_strings"))) \
@@ -70,17 +72,23 @@ struct marker {
...

Previous thread: [patch 25/26] Immediate Values Use Arch NMI and MCE Support by Mathieu Desnoyers on Thursday, January 24, 2008 - 4:27 pm. (1 message)

Next thread: [patch 07/26] Add INIT_ARRAY() to kernel.h by Mathieu Desnoyers on Thursday, January 24, 2008 - 4:27 pm. (14 messages)