David Smith [Tue, 17 Feb 2009 14:32:43 +0000 (08:32 -0600)]
Reduced control channel code duplication.
2009-02-17 David Smith <dsmith@redhat.com>
* control.c: Contains generic control channel functions.
* procfs.c: Specific procfs control channel functions. All generic
control channel functions moved to control.c.
* debugfs.c: New file containing debugfs specific control channel
functions.
* control.h: New file.
* transport.c: Updated file inclusion.
David Smith [Thu, 12 Feb 2009 20:52:40 +0000 (14:52 -0600)]
Cleanup. Renamed _stp_{un}lock_debugfs() to _stp_{un}lock_transport_dir().
2009-02-12 David Smith <dsmith@redhat.com>
* transport.c (_stp_lock_transport_dir): Renamed from
_stp_lock_debugfs(), since on older kernels this actually uses
procfs.
(_stp_unlock_transport_dir): Renamed from _stp_unlock_debugfs(),
since on older kernels this actually uses procfs.
(_stp_lock_transport_dir): Changed
_stp_lock_debugfs()/_stp_unlock_debugfs() to
_stp_lock_transport_dir()/_stp_unlock_transport_dir().
* transport.h: Ditto. Also added _stp_transport_init()
prototype.
* utt.c (utt_remove_root): Changed
_stp_lock_debugfs()/_stp_unlock_debugfs() to
_stp_lock_transport_dir()/_stp_unlock_transport_dir().
* relayfs.c (_stp_remove_relay_root): Ditto.
2009-02-12 David Smith <dsmith@redhat.com>
* procfs.c (_stp_rmdir_proc_module): Changed
_stp_lock_debugfs()/_stp_unlock_debugfs() to
_stp_lock_transport_dir()/_stp_unlock_transport_dir().
(_stp_mkdir_proc_module): Ditto.
Josh Stone [Wed, 11 Feb 2009 04:10:33 +0000 (20:10 -0800)]
Merge branch 'update_visitor'
This brings a new update_visitor that makes it easier to traverse the
parse tree and modify parts of it as necessary. I wrote this as part of
my in-progress work to allow @cast() expansion, but I was able to apply
it to the dwarf/etc. target variable expanders and to the optimization
stages. I think the resulting code is more predictable and easier to
follow...
Conflicts:
ChangeLog (bumped my commit dates to push dates...)
Josh Stone [Wed, 11 Feb 2009 02:29:55 +0000 (18:29 -0800)]
Simplify dead_stmtexpr_remover
* staptree.h (update_visitor::require): Add a clearok parameter for
optimizing traversers to signal that they're ready for NULL back.
* elaborate.cxx (dead_stmtexpr_remover): Convert to an update_visitor.
Josh Stone [Fri, 6 Feb 2009 04:04:56 +0000 (20:04 -0800)]
Expand probe variables without a deep copy
* tapsets.cxx (var_expanding_copy_visitor): This struct becomes
var_expanding_visitor and inherits from update_visitor instead of
deep_copy_visitor. Each of the probe-type variants of this are also no
longer copiers.
Josh Stone [Fri, 6 Feb 2009 04:02:35 +0000 (20:02 -0800)]
Create update_visitor for modifying trees
* staptree.h (update_visitor): A new visitor to make it easier to
rewrite parts of a probe or function without making a full copy.
* staptree.cxx (update_visitor::*): Each child is recursed with a
require() call, and then the parent returns itself with provide().
* staptree.h (deep_copy_visitor): Inherit from update_visitor to get
the recursive descent while updating nodes.
* staptree.cxx (deep_copy_visitor::*): Use the implicit copy
constructors to copy all fields, then defer to update_visitor for the
recursion. Referents are still cleared from the copies of symbols and
function calls.
Josh Stone [Sat, 7 Feb 2009 23:42:56 +0000 (15:42 -0800)]
Clean up the autoconf caching
This makes the stapconf caching process quite a bit more transparent.
The options are now cached in a header file as #defines, and this header
file is a normal build dependency instead of calling so many make
$(shell ...) commands.
* buildrun.cxx (compile_pass): Pull in autoconf options in a header
of #defines rather than -DXXX, and make that header a build dependency.
* buildrun.cxx (output_autoconf): New function to consolidate the
computation of each autoconf test.
* cache.cxx (add_to_cache, get_from_cache, clean_cache): Start treating
the stapconf header as a first-class cached item.
* cache.h: Move definitions of things only needed in cache.cxx
* hash.cxx (find_stapconf_hash): Generate stapconf_name as a .h now.
* main.cxx (main): Default the stapconf_name based on getpid().
Josh Stone [Fri, 6 Feb 2009 22:13:51 +0000 (14:13 -0800)]
Save kernel autoconf options in a cache file
We're getting enough autoconf tests now that it's a significant chunk of
the build time. Adding this cache shaves several seconds off for me.
* hash.cxx (find_hash): Compute a separate script-independent hash
for caching autoconf values, saved in session.stapconf_path.
* buildrun.cxx (compile_pass): Tweak the Makefile to read/save
the autoconf values in the cache directory