From c45f6fbff2e7e32b1b9cd4c6e726fa202a4542cf Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 21 Mar 2007 15:09:57 +0000 Subject: 2007-03-21 Martin Hunt * sym.h: Declare _stp_module_relocate. * sym.c (_stp_module_relocate): Add comments, reformat, add a way for "last" cached values to be cleared when modules are removed. (_stp_symbol_print): Simplify and remove static buffer. (_stp_symbol_snprint): Ditto. * symbols.c (_stp_del_module): Add a call to _stp_module_relocate to clear its cache. --- runtime/transport/ChangeLog | 5 +++++ runtime/transport/symbols.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'runtime/transport') diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index 90661baf..f752ccd4 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,8 @@ +2007-03-21 Martin Hunt + + * symbols.c (_stp_del_module): Add a call to _stp_module_relocate + to clear its cache. + 2007-03-20 Frank Ch. Eigler * symbols.c (_stp_do_symbols): Add cautionary blurb for important diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index ee5e967e..9780b0b1 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -1,7 +1,7 @@ /* -*- linux-c -*- * symbols.c - stp symbol and module functions * - * Copyright (C) Red Hat Inc, 2006 + * Copyright (C) Red Hat Inc, 2006, 2007 * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -110,6 +110,9 @@ static void _stp_del_module(struct _stp_module *mod) // kbug("deleting %s\n", mod->name); + /* signal relocation code to clear its cache */ + _stp_module_relocate((char *)-1, NULL, 0); + /* remove module from the arrays */ for (num = 0; num < _stp_num_modules; num++) { if (_stp_modules[num] == mod) -- cgit