]> sourceware.org Git - systemtap.git/commit
Refactor probe locking into shared functions
authorJosh Stone <jistone@redhat.com>
Wed, 21 Oct 2009 23:15:58 +0000 (16:15 -0700)
committerJosh Stone <jistone@redhat.com>
Wed, 21 Oct 2009 23:36:25 +0000 (16:36 -0700)
commit29bb0bbc8603edb20de09e79fd8addb4a174947d
tree2d39d41b9479c87839e22b9a9c81a4830d315377
parent1d2cd5ff6a8ff79b09e342a5907b29b4c340a9a5
Refactor probe locking into shared functions

For scripts with thousands of probes, we save a fair amount of code-gen
time in pass-4 by having the common locking code extracted into shared
functions.

* runtime/probe_lock.h (stp_lock_probe, stp_unlock_probe): New.
* translate.cxx (c_unparser::emit_lock_decls): New, emits a static
  const array of locks needed for each probe.
  (c_unparser::emit_locks): Just call stp_lock_probe.
  (c_unparser::emit_unlocks): Just call stp_unlock_probe.
runtime/probe_lock.h [new file with mode: 0644]
translate.cxx
This page took 0.024591 seconds and 5 git commands to generate.