This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/3] Updated the sunrpc.clnt.create_client probe


commit 81da09fee0a5fcb85c5e5b098a5919839b939c57
Author: Steve Dickson <steved@redhat.com>
Date:   Thu Feb 25 11:33:55 2010 -0500

    Updated the sunrpc.clnt.create_client probe
    
    In recent kernels, the client create code has been
    consolidated to a single routine. This patch reworks
    the probe to work with the current code.
    
    Signed-off-by: Steve Dickson <steved@redhat.com>

diff --git a/tapset/rpc.stp b/tapset/rpc.stp
index 3e65d0e..b2093be 100644
--- a/tapset/rpc.stp
+++ b/tapset/rpc.stp
@@ -71,6 +71,7 @@ probe sunrpc.clnt.return =
  *  @port:	 the port number
  *  @authflavor: the authentication flavor
  */
+%( kernel_v <= "2.6.18" %?
 probe sunrpc.clnt.create_client = _sunrpc.clnt.create_client.*
 {
 	servername = kernel_string($servname)
@@ -80,7 +81,6 @@ probe sunrpc.clnt.create_client = _sunrpc.clnt.create_client.*
 		prog, vers, prot, port, authflavor)
 }
 
-%( kernel_v <= "2.6.18" %?
 probe _sunrpc.clnt.create_client.part1 = kernel.function("rpc_create_client") !,
 	module("sunrpc").function("rpc_create_client")
 {
@@ -97,7 +97,6 @@ probe _sunrpc.clnt.create_client.part1 = kernel.function("rpc_create_client") !,
 	authflavor = $flavor
 %)
 }
-%)
 
 probe _sunrpc.clnt.create_client.part2 = kernel.function("rpc_new_client") !,
 	module("sunrpc").function("rpc_new_client")
@@ -108,20 +107,31 @@ probe _sunrpc.clnt.create_client.part2 = kernel.function("rpc_new_client") !,
 	vers = vers_from_prog($program, $vers)
 	authflavor = $flavor
 }
+%:
+probe sunrpc.clnt.create_client = kernel.function("rpc_new_client") !,
+	module("sunrpc").function("rpc_new_client")
+{
+	progname = kernel_string($args->program->name)
+	servername = kernel_string($args->servername);
+	prog = $args->program->number
+	vers = vers_from_prog($args->program, $args->version)
+	authflavor = $args->authflavor
+}
+%)
 
+%( kernel_v <= "2.6.18" %?
 probe sunrpc.clnt.create_client.return = _sunrpc.clnt.create_client.return.*
 {
+	name = "sunrpc.clnt.new_client.return"
 	retstr = returnstr(2)
 }
 
-%( kernel_v <= "2.6.18" %?
 probe _sunrpc.clnt.create_client.return.part1 = 
 	kernel.function("rpc_create_client").return !,
 	module("sunrpc").function("rpc_create_client").return
 {
 	name = "sunrpc.clnt.create_client.return"
 }
-%)
 
 probe _sunrpc.clnt.create_client.return.part2 =
 	kernel.function("rpc_new_client").return !,
@@ -129,6 +139,14 @@ probe _sunrpc.clnt.create_client.return.part2 =
 {
 	name = "sunrpc.clnt.new_client.return"
 }
+%:
+probe sunrpc.clnt.create_client.return = kernel.function("rpc_new_client") !,
+	module("sunrpc").function("rpc_new_client")
+{
+	name = "sunrpc.clnt.new_client.return"
+	retstr = returnstr(2)
+}
+%)
 
 /*
  * Fires when the RPC client structure is to be cloned
@@ -749,12 +767,19 @@ probe sunrpc.sched.return =
 probe sunrpc.sched.new_task = kernel.function("rpc_new_task") !,
       	module("sunrpc").function("rpc_new_task")
 {
+%( kernel_v <= "2.6.24" %?
 	xid = xid_from_clnt($clnt)
 	prog = prog_from_clnt($clnt)
 	vers = vers_from_clnt($clnt)
 	prot = prot_from_clnt($clnt)
 	flags  = $flags
-
+%:
+	xid = xid_from_clnt($setup_data->rpc_client)
+	prog = prog_from_clnt($setup_data->rpc_client)
+	vers = vers_from_clnt($setup_data->rpc_client)
+	prot = prot_from_clnt($setup_data->rpc_client)
+	flags  = $setup_data->flags
+%)
 	name = "sunrpc.sched.new_task"
 	argstr = sprintf("%d %d %d %d %d", xid, prog, vers, prot, flags)
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]