summaryrefslogtreecommitdiffstats
path: root/runtime/unwind.c
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-01-28 14:36:08 -0800
committerJosh Stone <jistone@redhat.com>2009-01-28 17:16:50 -0800
commit4c2732a1dad1de295c9219ee3afac007b2d7ba05 (patch)
treefb84977ad73f62ce57a147e9c3d6bf869376737c /runtime/unwind.c
parent83e08fc5458e8196d5f0ed5790f9f7de77a80bb6 (diff)
downloadsystemtap-steved-4c2732a1dad1de295c9219ee3afac007b2d7ba05.tar.gz
systemtap-steved-4c2732a1dad1de295c9219ee3afac007b2d7ba05.tar.xz
systemtap-steved-4c2732a1dad1de295c9219ee3afac007b2d7ba05.zip
Use 'static' as much as possible
This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results.
Diffstat (limited to 'runtime/unwind.c')
-rw-r--r--runtime/unwind.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/unwind.c b/runtime/unwind.c
index bc8a93dc..c1362237 100644
--- a/runtime/unwind.c
+++ b/runtime/unwind.c
@@ -655,7 +655,7 @@ static const char *_stp_enc_lo_name[] = {
"DW_EH_PE_sdata4",
"DW_EH_PE_sdata8"
};
-char *_stp_eh_enc_name(signed type)
+static char *_stp_eh_enc_name(signed type)
{
static char buf[64];
int hi, low;
@@ -685,7 +685,7 @@ char *_stp_eh_enc_name(signed type)
/* Unwind to previous to frame. Returns 0 if successful, negative
* number in case of an error. A positive return means unwinding is finished;
* don't try to fallback to dumping addresses on the stack. */
-int unwind(struct unwind_frame_info *frame)
+static int unwind(struct unwind_frame_info *frame)
{
#define FRAME_REG(r, t) (((t *)frame)[reg_info[r].offs])
const u32 *fde, *cie = NULL;