summaryrefslogtreecommitdiffstats
path: root/runtime/transport/procfs.c
diff options
context:
space:
mode:
authorhunt <hunt>2007-01-29 20:44:38 +0000
committerhunt <hunt>2007-01-29 20:44:38 +0000
commit45cf0d811a60287a12ce1641e569034753962ade (patch)
tree78bf98a215a4b57cb06b282f832efc34f3261fae /runtime/transport/procfs.c
parent4b670dde47e0899370182f85b909bcf1f242b722 (diff)
downloadsystemtap-steved-45cf0d811a60287a12ce1641e569034753962ade.tar.gz
systemtap-steved-45cf0d811a60287a12ce1641e569034753962ade.tar.xz
systemtap-steved-45cf0d811a60287a12ce1641e569034753962ade.zip
2007-01-29 Martin Hunt <hunt@redhat.com>
* procfs.c: Count allocated IO memory. * symbols.c: Use _stp_kmalloc() and _stp_kzalloc(). * transport.c: Count allocated IO memory.
Diffstat (limited to 'runtime/transport/procfs.c')
-rw-r--r--runtime/transport/procfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c
index 794f5c96..136c6d06 100644
--- a/runtime/transport/procfs.c
+++ b/runtime/transport/procfs.c
@@ -1,7 +1,7 @@
/* -*- linux-c -*-
*
* /proc transport and control
- * Copyright (C) 2005, 2006 Red Hat Inc.
+ * Copyright (C) 2005, 2006, 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
@@ -280,6 +280,7 @@ static int _stp_set_buffers(int num)
_stp_current_buffers += i;
goto err;
}
+ _stp_allocated_net_memory += sizeof(struct _stp_buffer);
spin_lock_irqsave(&_stp_pool_lock, flags);
list_add (p, &_stp_pool_q);
spin_unlock_irqrestore(&_stp_pool_lock, flags);
@@ -318,6 +319,7 @@ static int _stp_register_procfs (void)
// printk("allocated buffer at %lx\n", (long)p);
if (!p)
goto err2;
+ _stp_allocated_net_memory += sizeof(struct _stp_buffer);
list_add (p, &_stp_pool_q);
}
@@ -350,7 +352,7 @@ static int _stp_register_procfs (void)
if (de == NULL)
goto err1;
de->proc_fops = &_stp_proc_fops;
- de->data = kmalloc(sizeof(int), STP_ALLOC_FLAGS);
+ de->data = _stp_kmalloc(sizeof(int));
if (de->data == NULL) {
remove_proc_entry (buf, _stp_proc_mod);
goto err1;