From 9a5de18784b77de82e5121861fac892c2d4d2630 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 27 Feb 2008 19:45:45 +0000 Subject: 2008-02-27 Martin Hunt * sym.h (_stp_module): Add text_size, lock, and unwind data pointer. * sym.c (_stp_find_module_by_addr): New function. (_stp_kallsyms_lookup): Call _stp_find_module_by_addr(). (_stp_get_unwind_info): New. * runtime.h: Move debug macros to debug.h. Include it. * debug.h: New file. * map.c: Update debug calls. * map-gen.c: Update debug calls. * pmap-gen.c: Update debug calls. * mempool.c: New file. * symbols.c: Use rwlocks. Use new dbug macros. Handle unwind info if present. * transport.c: Include mempool.c. Update dbug and kbug calls to new macros. * transport_msgs.h (_stp_command_name): Add struct containing message names for debugging. * control.c, procfs.c: Use new dbug macros. Use new mempool functions. --- runtime/runtime.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index d951833d..318d3038 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -1,5 +1,5 @@ /* main header file - * Copyright (C) 2005-2007 Red Hat Inc. + * Copyright (C) 2005-2008 Red Hat Inc. * Copyright (C) 2005, 2006 Intel Corporation. * * This file is part of systemtap, and is free software. You can @@ -46,21 +46,7 @@ static void _stp_dbug (const char *func, int line, const char *fmt, ...); void _stp_error (const char *fmt, ...); -#ifdef DEBUG -/** Prints debug line. - * This function prints a debug message immediately to staprun. - * If the last character is not a newline, then one is added. - * @param args A variable number of args in a format like printf. - * @ingroup io - */ -#define dbug(args...) _stp_dbug(__FUNCTION__, __LINE__, args) -#define kbug(args...) {printk("%s:%d ",__FUNCTION__, __LINE__); printk(args); } -#else -#define dbug(args...) ; -#define kbug(args...) ; -#endif /* DEBUG */ -#define _dbug(args...) _stp_dbug(__FUNCTION__, __LINE__, args) -#define errk(args...) {printk("Systemtap Error at %s:%d ",__FUNCTION__, __LINE__); printk(args); } +#include "debug.h" /* atomic globals */ static atomic_t _stp_transport_failures = ATOMIC_INIT (0); -- cgit