summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples/memory/vm.tracepoints.stp
blob: 61335d3472aa9321882593a2b69b54cfcb71a750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /usr/bin/env stap

global slabs

probe vm.kmem_cache_alloc {
	slabs [execname(), bytes_req]<<<1
}

probe timer.ms(10000)
{
	dummy = "";
	foreach ([name, bytes] in slabs) {
		if (dummy != name)
			printf("\nProcess:%s\n", name);
        	printf("Slab_size:%d\tCount:%d\n", bytes, @count(slabs[name, bytes]));
		dummy = name;
	}
	delete slabs
	printf("\n-------------------------------------------------------\n\n")
}