summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.h
diff options
context:
space:
mode:
authorhunt <hunt>2007-03-14 16:13:33 +0000
committerhunt <hunt>2007-03-14 16:13:33 +0000
commit8c235ce57600584d3126ad86520b4fb44765c8ec (patch)
tree4a7ee542bda895a54edbb5863d68bce19d4f135f /runtime/runtime.h
parentfbbb89fffb3533a3b4fb63c15eaeaae6956391eb (diff)
downloadsystemtap-steved-8c235ce57600584d3126ad86520b4fb44765c8ec.tar.gz
systemtap-steved-8c235ce57600584d3126ad86520b4fb44765c8ec.tar.xz
systemtap-steved-8c235ce57600584d3126ad86520b4fb44765c8ec.zip
2007-03-14 Martin Hunt <hunt@redhat.com>
* bench2/bench.rb: Updated to work with new transport and new itest.c. * bench2/Makefile: Updated for new itest.c * bench2/itest.c: Rewritten to use multiple threads and automatically divide the workload among the threads. * print.c (_stp_print_flush): Move to print_new.c and print_old.c. * print_new.c: New file containing _stp_print_flush() for the new transport. * print_old.c: Ditto for old transport. * runtime.h (STP_OLD_TRANSPORT): Define (errk): Define. (MAXSTRINGLEN): Define if not already defined. * io.c (_stp_vlog): Use _stp_ctl_write().
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r--runtime/runtime.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 4d741cf4..6fa168dc 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -1,5 +1,5 @@
/* main header file
- * Copyright (C) 2005, 2006 Red Hat Inc.
+ * Copyright (C) 2005-2007 Red Hat Inc.
* Copyright (C) 2005, 2006 Intel Corporation.
*
* This file is part of systemtap, and is free software. You can
@@ -10,9 +10,6 @@
#ifndef _RUNTIME_H_
#define _RUNTIME_H_
-/** @file runtime.h
- * @brief Main include file for runtime functions.
- */
#include <linux/module.h>
#include <linux/ctype.h>
@@ -33,6 +30,11 @@
#include <linux/compat.h>
#include <linux/mm.h>
+/* the new transport requires debugfs and a newer relayfs */
+#if !defined (CONFIG_DEBUG_FS) || (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+#define STP_OLD_TRANSPORT
+#endif
+
#ifndef for_each_cpu
#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
#endif
@@ -51,18 +53,17 @@ static void _stp_dbug (const char *func, int line, const char *fmt, ...);
#define dbug(args...) ;
#define kbug(args...) ;
#endif /* DEBUG */
+#define errk(args...) {printk("Systemtap Error at %s:%d ",__FUNCTION__, __LINE__); printk(args); }
/* atomic globals */
static atomic_t _stp_transport_failures = ATOMIC_INIT (0);
-#ifdef STP_RELAYFS
static struct
{
atomic_t ____cacheline_aligned_in_smp seq;
} _stp_seq = { ATOMIC_INIT (0) };
#define _stp_seq_inc() (atomic_inc_return(&_stp_seq.seq))
-#endif /* RELAYFS */
/* TEST_MODE is always defined by systemtap */
#ifdef TEST_MODE
@@ -72,6 +73,10 @@ static struct
#define TRYLOCKDELAY 100
#endif
+#ifndef MAXSTRINGLEN
+#define MAXSTRINGLEN 128
+#endif
+
#include "alloc.c"
#include "print.c"
#include "string.c"