summaryrefslogtreecommitdiffstats
path: root/tapset/LKET/syscalls.stp
blob: cd6850aa29afa8bfbcc172232cc71be477061c51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (C) 2005, 2006 IBM Corp.
//
// 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
// Public License (GPL); either version 2, or (at your option) any
// later version.

probe addevent.syscall
	= addevent.syscall.entry,
	addevent.syscall.return
{}

probe addevent.syscall.entry
	+= _addevent.syscall.entry
{
	update_record()
}

probe _addevent.syscall.entry
	= syscall.*
{
	if(filter_by_pid() == 1 ) {
		log_syscall_tracedata(HOOKID_SYSCALL_ENTRY, name)
	}
}

probe addevent.syscall.return
	+= _addevent.syscall.return
{
	update_record()
}

probe _addevent.syscall.return
	= syscall.*.return
{
	if(filter_by_pid() == 1 ) {
		log_syscall_tracedata(HOOKID_SYSCALL_RETURN, name)
	}
}

/* log the system call name */
function log_syscall_tracedata(var_id:long, name:string)
%{
	_lket_trace(_GROUP_SYSCALL, THIS->var_id, "%0s", THIS->name); 
%}