summaryrefslogtreecommitdiffstats
path: root/runtime/io.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/io.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/io.c')
-rw-r--r--runtime/io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/io.c b/runtime/io.c
index c49d86e6..c7223fb0 100644
--- a/runtime/io.c
+++ b/runtime/io.c
@@ -66,7 +66,7 @@ static void _stp_vlog (enum code type, const char *func, int line, const char *f
* @param fmt A variable number of args.
* @todo Evaluate if this function is necessary.
*/
-void _stp_log (const char *fmt, ...)
+static void _stp_log (const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -81,7 +81,7 @@ void _stp_log (const char *fmt, ...)
* is added.
* @param fmt A variable number of args.
*/
-void _stp_warn (const char *fmt, ...)
+static void _stp_warn (const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -97,7 +97,7 @@ void _stp_warn (const char *fmt, ...)
* call. You should probably call return immediately after
* calling _stp_exit().
*/
-void _stp_exit (void)
+static void _stp_exit (void)
{
_stp_exit_flag = 1;
}
@@ -112,7 +112,7 @@ void _stp_exit (void)
* @param fmt A variable number of args.
* @sa _stp_exit().
*/
-void _stp_error (const char *fmt, ...)
+static void _stp_error (const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -131,7 +131,7 @@ void _stp_error (const char *fmt, ...)
* @param fmt A variable number of args.
* @sa _stp_error
*/
-void _stp_softerror (const char *fmt, ...)
+static void _stp_softerror (const char *fmt, ...)
{
va_list args;
va_start(args, fmt);