+2007-02-25 Frank Ch. Eigler <fche@redhat.com>
+
+ * 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.
+
2007-02-23 Josh Stone <joshua.i.stone@intel.com>
PR 4096
// 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
}
+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
// ------------------------------------------------------------------------
}
}
}
+
+ // 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
}
// -*- C++ -*-
-// 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
std::map<std::string, literal*> const & parameters,
std::vector<derived_probe*> & finished_results) = 0;
virtual ~derived_probe_builder() {}
+ virtual void build_no_more (systemtap_session &) {}
static bool get_param (std::map<std::string, literal*> const & parameters,
const std::string& key, std::string& value);
void find_and_build (systemtap_session& s,
probe* p, probe_point *loc, unsigned pos,
std::vector<derived_probe *>& results);
+ void build_no_more (systemtap_session &s);
match_node* bind(match_key const & k);
match_node* bind(std::string const & k);
// tapset resolution
-// Copyright (C) 2005, 2006 Red Hat Inc.
-// Copyright (C) 2005, 2006 Intel Corporation.
+// Copyright (C) 2005-2007 Red Hat Inc.
+// Copyright (C) 2005-2007 Intel Corporation.
//
// 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
dwarf_builder()
: kern_dw(NULL), user_dw(NULL)
{}
+
+ void build_no_more (systemtap_session &s)
+ {
+ if (kern_dw)
+ {
+ if (s.verbose > 3)
+ clog << "dwarf_builder releasing dwflpp" << endl;
+ delete kern_dw;
+ kern_dw = 0;
+ }
+ }
+
~dwarf_builder()
{
if (kern_dw)
if (user_dw)
delete user_dw;
}
+
virtual void build(systemtap_session & sess,
probe * base,
probe_point * location,