From aa30ccd31a0163bed25b993ae386efe1cd1feb39 Mon Sep 17 00:00:00 2001 From: fche Date: Sun, 25 Feb 2007 23:03:49 +0000 Subject: 2007-02-25 Frank Ch. Eigler * elaborate.h (match_node, derived_probe_builder): Add build_no_more member function. * elaborate.cxx (semantic_pass_symbols): Call it. * tapsets.cxx (dwarf_builder): Implement it by releasing dwflpp instance after pass 2, freeing mucho memory. --- elaborate.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index 05c2be57..ef019016 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1,5 +1,5 @@ // elaboration functions -// Copyright (C) 2005, 2006 Red Hat Inc. +// Copyright (C) 2005-2007 Red Hat Inc. // // 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 @@ -326,6 +326,15 @@ match_node::find_and_build (systemtap_session& s, } +void +match_node::build_no_more (systemtap_session& s) +{ + for (sub_map_iterator_t i = sub.begin(); i != sub.end(); i++) + i->second->build_no_more (s); + if (end) end->build_no_more (s); +} + + // ------------------------------------------------------------------------ // Alias probes // ------------------------------------------------------------------------ @@ -914,6 +923,10 @@ semantic_pass_symbols (systemtap_session& s) } } } + + // Inform all derived_probe builders that we're done with + // all resolution, so it's time to release caches. + s.pattern_root->build_no_more (s); return s.num_errors(); // all those print_error calls } -- cgit