From e8b0c173ead03ef3d050ada086a9b92e1bd6cb43 Mon Sep 17 00:00:00 2001 From: Srikar Dronamraju Date: Fri, 23 May 2008 13:14:30 +0530 Subject: Srinivasa DS ,PR6429 Inerim fix to avoid compilation error of systemtap module --- ChangeLog | 5 +++++ runtime/transport/symbols.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4d02db5f..43d2b479 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-23 Srinivasa DS + PR 6429: Inerim fix to avoid compilation error of systemtap module + * runtime/transport/symbols.c: added definitions of struct + module_sect_attr, struct module_sect_attrs for 2.6.25 above kernels. + 2008-05-22 Wenji Huang * tapsets.cxx (iterate_over_functions): Fix .statement(NUM) regression. diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 087bf893..ec047922 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -196,7 +196,11 @@ static int _stp_init_kernel_symbols(void) _stp_num_modules = 1; /* Note: this mapping is used by kernel/_stext pseudo-relocations. */ + #ifdef __powerpc__ + _stp_modules[0]->text = _stp_kallsyms_lookup_name(".__start"); + #else _stp_modules[0]->text = _stp_kallsyms_lookup_name("_stext"); + #endif if (_stp_modules[0]->text == 0) { _dbug("Lookup of _stext failed. Exiting.\n"); return -1; @@ -399,6 +403,22 @@ static int _stp_section_is_interesting(const char *name) return ret; } +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25) +struct module_sect_attr +{ + struct module_attribute mattr; + char *name; + unsigned long address; +}; + +struct module_sect_attrs +{ + struct attribute_group grp; + unsigned int nsections; + struct module_sect_attr attrs[0]; +}; +#endif + /* Create a new _stp_module and load the symbols */ static struct _stp_module *_stp_load_module_symbols(struct module *mod) { -- cgit From d93584063113d0818c8b7875ab9d337c0efab8a2 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 23 May 2008 10:08:42 -0400 Subject: rpc tapset cleanup --- tapset/ChangeLog | 5 ++ tapset/rpc.stp | 167 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 91 insertions(+), 81 deletions(-) diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 4b37471c..cc226a98 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,8 @@ +2008-05-23 Frank Ch. Eigler + + * rpc.stp (*): Convert kernel?,module? -> kernel!,module probe points. + (rpc_create_task): Make conditional on kernel <= 2.6.18. + 2008-05-21 Frank Ch. Eigler PR 6538 diff --git a/tapset/rpc.stp b/tapset/rpc.stp index 537bf348..f97117b5 100644 --- a/tapset/rpc.stp +++ b/tapset/rpc.stp @@ -1,6 +1,7 @@ // rpc tapset // Copyright (C) 2006 IBM Corp. // Copyright (C) 2007 Bull S.A.S +// Copyright (C) 2008 Red Hat // // 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 @@ -79,8 +80,9 @@ probe sunrpc.clnt.create_client = _sunrpc.clnt.create_client.* prog, vers, prot, port, authflavor) } -probe _sunrpc.clnt.create_client.part1 = kernel.function("rpc_create_client") ?, - module("sunrpc").function("rpc_create_client") ? +%( kernel_v <= "2.6.18" %? +probe _sunrpc.clnt.create_client.part1 = kernel.function("rpc_create_client") !, + module("sunrpc").function("rpc_create_client") { name = "sunrpc.clnt.create_client" %( kernel_v >= "2.6.10" %? @@ -95,9 +97,10 @@ 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") ? +probe _sunrpc.clnt.create_client.part2 = kernel.function("rpc_new_client") !, + module("sunrpc").function("rpc_new_client") { name = "sunrpc.clnt.new_client" progname = kernel_string($program->name) @@ -106,21 +109,23 @@ probe _sunrpc.clnt.create_client.part2 = kernel.function("rpc_new_client") ?, authflavor = $flavor } -probe sunrpc.clnt.create_client.return = _sunrpc.clnt.create_client.return.* +probe sunrpc.clnt.create_client.return = _sunrpc.clnt.create_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 ? + 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 ?, - module("sunrpc").function("rpc_new_client").return ? + kernel.function("rpc_new_client").return !, + module("sunrpc").function("rpc_new_client").return { name = "sunrpc.clnt.new_client.return" } @@ -138,8 +143,8 @@ probe _sunrpc.clnt.create_client.return.part2 = * @port: the port number * @authflavor: the authentication flavor */ -probe sunrpc.clnt.clone_client = kernel.function("rpc_clone_client") ?, - module("sunrpc").function("rpc_clone_client") ? +probe sunrpc.clnt.clone_client = kernel.function("rpc_clone_client") !, + module("sunrpc").function("rpc_clone_client") { servername = kernel_string($clnt->cl_server) progname = kernel_string($clnt->cl_protname) @@ -155,8 +160,8 @@ probe sunrpc.clnt.clone_client = kernel.function("rpc_clone_client") ?, } probe sunrpc.clnt.clone_client.return = - kernel.function("rpc_clone_client").return ?, - module("sunrpc").function("rpc_clone_client").return ? + kernel.function("rpc_clone_client").return !, + module("sunrpc").function("rpc_clone_client").return { name = "sunrpc.clnt.clone_client.return" retstr = returnstr(2) @@ -188,8 +193,8 @@ probe sunrpc.clnt.clone_client.return = * @om_rtt: the RPC RTT jiffies * @om_execute: the RPC execution jiffies */ -probe sunrpc.clnt.shutdown_client = kernel.function("rpc_shutdown_client") ?, - module("sunrpc").function("rpc_shutdown_client") ? +probe sunrpc.clnt.shutdown_client = kernel.function("rpc_shutdown_client") !, + module("sunrpc").function("rpc_shutdown_client") { servername = kernel_string($clnt->cl_server) progname = kernel_string($clnt->cl_protname) @@ -220,8 +225,8 @@ probe sunrpc.clnt.shutdown_client = kernel.function("rpc_shutdown_client") ?, } probe sunrpc.clnt.shutdown_client.return = - kernel.function("rpc_shutdown_client").return ?, - module("sunrpc").function("rpc_shutdown_client").return ? + kernel.function("rpc_shutdown_client").return !, + module("sunrpc").function("rpc_shutdown_client").return { name = "sunrpc.clnt.shutdown_client.return" retstr = returnstr(1) @@ -242,8 +247,8 @@ probe sunrpc.clnt.shutdown_client.return = * @vers: the version of new RPC program */ probe sunrpc.clnt.bind_new_program = - kernel.function("rpc_bind_new_program") ?, - module("sunrpc").function("rpc_bind_new_program") ? + kernel.function("rpc_bind_new_program") !, + module("sunrpc").function("rpc_bind_new_program") { servername = kernel_string($old->cl_server) old_progname = kernel_string($old->cl_protname) @@ -259,8 +264,8 @@ probe sunrpc.clnt.bind_new_program = } probe sunrpc.clnt.bind_new_program.return = - kernel.function("rpc_bind_new_program").return ?, - module("sunrpc").function("rpc_bind_new_program").return ? + kernel.function("rpc_bind_new_program").return !, + module("sunrpc").function("rpc_bind_new_program").return { name = "sunrpc.clnt.bind_new_program.return" retstr = returnstr(2) @@ -282,8 +287,8 @@ probe sunrpc.clnt.bind_new_program.return = * @proc: the procedure number in this RPC call * @flags: flags */ -probe sunrpc.clnt.call_sync = kernel.function("rpc_call_sync") ?, - module("sunrpc").function("rpc_call_sync") ? +probe sunrpc.clnt.call_sync = kernel.function("rpc_call_sync") !, + module("sunrpc").function("rpc_call_sync") { servername = kernel_string($clnt->cl_server) progname = kernel_string($clnt->cl_protname) @@ -306,8 +311,8 @@ probe sunrpc.clnt.call_sync = kernel.function("rpc_call_sync") ?, vers, procname, flags) } -probe sunrpc.clnt.call_sync.return = kernel.function("rpc_call_sync").return ?, - module("sunrpc").function("rpc_call_sync").return ? +probe sunrpc.clnt.call_sync.return = kernel.function("rpc_call_sync").return !, + module("sunrpc").function("rpc_call_sync").return { name = "sunrpc.clnt.call_sync.return" retstr = returnstr(1) @@ -329,8 +334,8 @@ probe sunrpc.clnt.call_sync.return = kernel.function("rpc_call_sync").return ?, * @proc: the procedure number in this RPC call * @flags: flags */ -probe sunrpc.clnt.call_async = kernel.function("rpc_call_async") ?, - module("sunrpc").function("rpc_call_async") ? +probe sunrpc.clnt.call_async = kernel.function("rpc_call_async") !, + module("sunrpc").function("rpc_call_async") { servername = kernel_string($clnt->cl_server) progname = kernel_string($clnt->cl_protname) @@ -354,8 +359,8 @@ probe sunrpc.clnt.call_async = kernel.function("rpc_call_async") ?, } probe sunrpc.clnt.call_async.return = - kernel.function("rpc_call_async").return ?, - module("sunrpc").function("rpc_call_async").return ? + kernel.function("rpc_call_async").return !, + module("sunrpc").function("rpc_call_async").return { name = "sunrpc.clnt.call_async.return" retstr = returnstr(1) @@ -374,8 +379,8 @@ probe sunrpc.clnt.call_async.return = * @tk_priority: the task priority * @tk_runstate: the task run status */ -probe sunrpc.clnt.restart_call = kernel.function("rpc_restart_call") ?, - module("sunrpc").function("rpc_restart_call") ? +probe sunrpc.clnt.restart_call = kernel.function("rpc_restart_call") !, + module("sunrpc").function("rpc_restart_call") { servername = kernel_string($task->tk_client->cl_server) prog = prog_from_clnt($task->tk_client) @@ -391,8 +396,8 @@ probe sunrpc.clnt.restart_call = kernel.function("rpc_restart_call") ?, } probe sunrpc.clnt.restart_call.return = - kernel.function("rpc_restart_call").return ?, - module("sunrpc").function("rpc_restart_call").return ? + kernel.function("rpc_restart_call").return !, + module("sunrpc").function("rpc_restart_call").return { name = "sunrpc.clnt.restart_call.return" } @@ -434,8 +439,8 @@ probe sunrpc.svc.return = * @prot: the IP protocol number * @port: the port number */ -probe sunrpc.svc.register = kernel.function("svc_register") ?, - module("sunrpc").function("svc_register") ? +probe sunrpc.svc.register = kernel.function("svc_register") !, + module("sunrpc").function("svc_register") { sv_name = kernel_string($serv->sv_name) progname = kernel_string($serv->sv_program->pg_name) @@ -447,8 +452,8 @@ probe sunrpc.svc.register = kernel.function("svc_register") ?, argstr = sprintf("%s %s %d %d", sv_name, progname, prot, port) } -probe sunrpc.svc.register.return = kernel.function("svc_register").return ?, - module("sunrpc").function("svc_register").return ? +probe sunrpc.svc.register.return = kernel.function("svc_register").return !, + module("sunrpc").function("svc_register").return { name = "sunrpc.svc.register.return" retstr = returnstr(1) @@ -465,8 +470,8 @@ probe sunrpc.svc.register.return = kernel.function("svc_register").return ?, * @pg_nvers: the number of supported versions * @bufsize: the buffer size */ -probe sunrpc.svc.create = kernel.function("svc_create") ?, - module("sunrpc").function("svc_create") ? +probe sunrpc.svc.create = kernel.function("svc_create") !, + module("sunrpc").function("svc_create") { progname = kernel_string($prog->pg_name) prog = $prog->pg_prog @@ -477,8 +482,8 @@ probe sunrpc.svc.create = kernel.function("svc_create") ?, argstr = sprintf("%s %d %d %d", progname, prog, pg_nvers, bufsize) } -probe sunrpc.svc.create.return = kernel.function("svc_create").return ?, - module("sunrpc").function("svc_create").return ? +probe sunrpc.svc.create.return = kernel.function("svc_create").return !, + module("sunrpc").function("svc_create").return { name = "sunrpc.svc.create.return" retstr = returnstr(2) @@ -499,8 +504,8 @@ probe sunrpc.svc.create.return = kernel.function("svc_create").return ?, * @rpcbadfmt: the count of requests dropped for bad formats * @rpcbadauth: the count of requests drooped for authentication failure */ -probe sunrpc.svc.destroy = kernel.function("svc_destroy") ?, - module("sunrpc").function("svc_destroy") ? +probe sunrpc.svc.destroy = kernel.function("svc_destroy") !, + module("sunrpc").function("svc_destroy") { sv_name = kernel_string($serv->sv_name) /* service name */ sv_progname = kernel_string($serv->sv_program->pg_name) @@ -518,8 +523,8 @@ probe sunrpc.svc.destroy = kernel.function("svc_destroy") ?, argstr = sprintf("%s %d %d", sv_name, sv_prog, sv_nrthreads) } -probe sunrpc.svc.destroy.return = kernel.function("svc_destroy").return ?, - module("sunrpc").function("svc_destroy").return ? +probe sunrpc.svc.destroy.return = kernel.function("svc_destroy").return !, + module("sunrpc").function("svc_destroy").return { name = "sunrpc.svc.destroy.return" } @@ -539,8 +544,8 @@ probe sunrpc.svc.destroy.return = kernel.function("svc_destroy").return ?, * @rq_proc: the procedure number in the request * @rq_prot: the IP protocol of the reqeust */ -probe sunrpc.svc.process = kernel.function("svc_process") ?, - module("sunrpc").function("svc_process") ? +probe sunrpc.svc.process = kernel.function("svc_process") !, + module("sunrpc").function("svc_process") { %( kernel_v >= "2.6.19" %? sv_name = kernel_string($rqstp->rq_server->sv_name) /* service name */ @@ -563,8 +568,8 @@ probe sunrpc.svc.process = kernel.function("svc_process") ?, rq_xid, rq_prog, rq_vers, rq_proc) } -probe sunrpc.svc.process.return = kernel.function("svc_process").return ?, - module("sunrpc").function("svc_process").return ? +probe sunrpc.svc.process.return = kernel.function("svc_process").return !, + module("sunrpc").function("svc_process").return { name = "sunrpc.svc.process.return" retstr = returnstr(1) @@ -583,8 +588,8 @@ probe sunrpc.svc.process.return = kernel.function("svc_process").return ?, * @rq_proc: the procedure number in the request * @rq_prot: the IP protocol of the reqeust */ -probe sunrpc.svc.authorise = kernel.function("svc_authorise")?, - module("sunrpc").function("svc_authorise")? +probe sunrpc.svc.authorise = kernel.function("svc_authorise") !, + module("sunrpc").function("svc_authorise") { sv_name = kernel_string($rqstp->rq_server->sv_name) peer_ip = addr_from_rqst($rqstp) @@ -599,8 +604,8 @@ probe sunrpc.svc.authorise = kernel.function("svc_authorise")?, rq_vers, rq_proc, rq_prot) } -probe sunrpc.svc.authorise.return = kernel.function("svc_authorise").return ?, - module("sunrpc").function("svc_authorise").return ? +probe sunrpc.svc.authorise.return = kernel.function("svc_authorise").return !, + module("sunrpc").function("svc_authorise").return { name = "sunrpc.svc.authorise.return" retstr = returnstr(1) @@ -616,8 +621,8 @@ probe sunrpc.svc.authorise.return = kernel.function("svc_authorise").return ?, * @sv_nrthreads:the number of concurrent threads * @timeout: the timeout of waiting for data */ -probe sunrpc.svc.recv = kernel.function("svc_recv")?, - module("sunrpc").function("svc_recv")? +probe sunrpc.svc.recv = kernel.function("svc_recv") !, + module("sunrpc").function("svc_recv") { %( kernel_v >= "2.6.19" %? sv_name = kernel_string($rqstp->rq_server->sv_name) @@ -634,8 +639,8 @@ probe sunrpc.svc.recv = kernel.function("svc_recv")?, argstr = sprintf("%s %d", sv_name, timeout) } -probe sunrpc.svc.recv.return = kernel.function("svc_recv").return ?, - module("sunrpc").function("svc_recv").return ? +probe sunrpc.svc.recv.return = kernel.function("svc_recv").return !, + module("sunrpc").function("svc_recv").return { name = "sunrpc.svc.recv.return" retstr = returnstr(1) @@ -654,8 +659,8 @@ probe sunrpc.svc.recv.return = kernel.function("svc_recv").return ?, * @rq_proc: the procedure number in the request * @rq_prot: the IP protocol of the reqeust */ -probe sunrpc.svc.send = kernel.function("svc_send")?, - module("sunrpc").function("svc_send")? +probe sunrpc.svc.send = kernel.function("svc_send") !, + module("sunrpc").function("svc_send") { sv_name = kernel_string($rqstp->rq_server->sv_name) peer_ip = addr_from_rqst($rqstp) @@ -670,8 +675,8 @@ probe sunrpc.svc.send = kernel.function("svc_send")?, rq_xid, rq_prog, rq_vers, rq_proc, rq_prot) } -probe sunrpc.svc.send.return = kernel.function("svc_send").return ?, - module("sunrpc").function("svc_send").return ? +probe sunrpc.svc.send.return = kernel.function("svc_send").return !, + module("sunrpc").function("svc_send").return { name = "sunrpc.svc.send.return" retstr = returnstr(1) @@ -690,8 +695,8 @@ probe sunrpc.svc.send.return = kernel.function("svc_send").return ?, * @rq_proc: the procedure number in the request * @rq_prot: the IP protocol of the reqeust */ -probe sunrpc.svc.drop = kernel.function("svc_drop")?, - module("sunrpc").function("svc_drop")? +probe sunrpc.svc.drop = kernel.function("svc_drop") !, + module("sunrpc").function("svc_drop") { sv_name = kernel_string($rqstp->rq_server->sv_name) peer_ip = addr_from_rqst($rqstp) @@ -706,8 +711,8 @@ probe sunrpc.svc.drop = kernel.function("svc_drop")?, rq_xid, rq_prog, rq_vers, rq_proc, rq_prot) } -probe sunrpc.svc.drop.return = kernel.function("svc_drop").return ?, - module("sunrpc").function("svc_drop").return ? +probe sunrpc.svc.drop.return = kernel.function("svc_drop").return !, + module("sunrpc").function("svc_drop").return { name = "sunrpc.svc.drop.return" } @@ -741,8 +746,8 @@ probe sunrpc.sched.return = * @prot: the IP protocol in the RPC call * @tk_flags: the flags of the task */ -probe sunrpc.sched.new_task = kernel.function("rpc_new_task") ?, - module("sunrpc").function("rpc_new_task") ? +probe sunrpc.sched.new_task = kernel.function("rpc_new_task") !, + module("sunrpc").function("rpc_new_task") { xid = xid_from_clnt($clnt) prog = prog_from_clnt($clnt) @@ -754,8 +759,8 @@ probe sunrpc.sched.new_task = kernel.function("rpc_new_task") ?, argstr = sprintf("%d %d %d %d %d", xid, prog, vers, prot, flags) } -probe sunrpc.sched.new_task.return = kernel.function("rpc_new_task").return ?, - module("sunrpc").function("rpc_new_task").return ? +probe sunrpc.sched.new_task.return = kernel.function("rpc_new_task").return !, + module("sunrpc").function("rpc_new_task").return { name = "sunrpc.sched.new_task.return" retstr = returnstr(2) @@ -772,8 +777,8 @@ probe sunrpc.sched.new_task.return = kernel.function("rpc_new_task").return ?, * @prot: the IP protocol in the RPC call * @tk_flags: the flags of the task */ -probe sunrpc.sched.release_task = kernel.function("rpc_release_task") ?, - module("sunrpc").function("rpc_release_task") ? +probe sunrpc.sched.release_task = kernel.function("rpc_release_task") !, + module("sunrpc").function("rpc_release_task") { xid = xid_from_clnt($task->tk_client) prog = prog_from_clnt($task->tk_client) @@ -786,8 +791,8 @@ probe sunrpc.sched.release_task = kernel.function("rpc_release_task") ?, } probe sunrpc.sched.release_task.return = - kernel.function("rpc_release_task").return ?, - module("sunrpc").function("rpc_release_task").return ? + kernel.function("rpc_release_task").return !, + module("sunrpc").function("rpc_release_task").return { name = "sunrpc.sched.release_task.return" } @@ -805,8 +810,8 @@ probe sunrpc.sched.release_task.return = * @tk_pid: the debugging id of the task * @tk_flags: the flags of the task */ -probe sunrpc.sched.execute = kernel.function("__rpc_execute") ?, - module("sunrpc").function("__rpc_execute") ? +probe sunrpc.sched.execute = kernel.function("__rpc_execute") !, + module("sunrpc").function("__rpc_execute") { xid = xid_from_clnt($task->tk_client) prog = prog_from_clnt($task->tk_client) @@ -820,8 +825,8 @@ probe sunrpc.sched.execute = kernel.function("__rpc_execute") ?, tk_pid, tk_flags) } -probe sunrpc.sched.execute.return = kernel.function("__rpc_execute").return ?, - module("sunrpc").function("__rpc_execute").return ? +probe sunrpc.sched.execute.return = kernel.function("__rpc_execute").return !, + module("sunrpc").function("__rpc_execute").return { name = "sunrpc.sched.execute.return" @@ -845,8 +850,8 @@ probe sunrpc.sched.execute.return = kernel.function("__rpc_execute").return ?, * @tk_flags: the flags of the task * @delay: the time delayed */ -probe sunrpc.sched.delay = kernel.function("rpc_delay") ?, - module("sunrpc").function("rpc_delay") ? +probe sunrpc.sched.delay = kernel.function("rpc_delay") !, + module("sunrpc").function("rpc_delay") { xid = xid_from_clnt($task->tk_client) prog = prog_from_clnt($task->tk_client) @@ -861,8 +866,8 @@ probe sunrpc.sched.delay = kernel.function("rpc_delay") ?, prot, tk_pid, tk_flags, delay) } -probe sunrpc.sched.delay.return = kernel.function("rpc_delay").return ?, - module("sunrpc").function("rpc_delay").return ? +probe sunrpc.sched.delay.return = kernel.function("rpc_delay").return !, + module("sunrpc").function("rpc_delay").return { name = "sunrpc.sched.delay.return" } -- cgit From 1b45005138f7c5f7b78e80f426a5ef3bee0fdc7e Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 23 May 2008 10:17:41 -0400 Subject: testsuite cleanup: kfailing some FOO-all-probes tests --- testsuite/ChangeLog | 8 ++++++++ testsuite/buildok/nfs-all-probes.stp | 2 +- testsuite/buildok/rpc-all-probes.stp | 2 +- testsuite/systemtap.pass1-4/buildok.exp | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index fa6e4fad..841dc8e3 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2008-05-23 Frank Ch. Eigler + + * buildok/{nfs,rpc}-all-probes.stp: Suppress warnings from empty probe + bodies. + * systemtap.pass1-4/buidok.exp: Mark above as kfail due to bug #4413. + While there, also mark the process_test kfail for #1155, though even + it fails only sporadically. + 2008-05-21 Frank Ch. Eigler PR 6538 diff --git a/testsuite/buildok/nfs-all-probes.stp b/testsuite/buildok/nfs-all-probes.stp index fb492c8c..ebff3472 100755 --- a/testsuite/buildok/nfs-all-probes.stp +++ b/testsuite/buildok/nfs-all-probes.stp @@ -1,4 +1,4 @@ -#! stap -p4 +#! stap -wp4 // Tests if all probes in nfs.stp and nfs_proc.stp are resolvable. diff --git a/testsuite/buildok/rpc-all-probes.stp b/testsuite/buildok/rpc-all-probes.stp index 2ecc42c7..c85ff80b 100755 --- a/testsuite/buildok/rpc-all-probes.stp +++ b/testsuite/buildok/rpc-all-probes.stp @@ -1,4 +1,4 @@ -#! stap -p4 +#! stap -wp4 // Tests if all probes in rpc.stp are resolvable. diff --git a/testsuite/systemtap.pass1-4/buildok.exp b/testsuite/systemtap.pass1-4/buildok.exp index 07580550..08d50fb5 100644 --- a/testsuite/systemtap.pass1-4/buildok.exp +++ b/testsuite/systemtap.pass1-4/buildok.exp @@ -9,6 +9,9 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] { buildok/twentysix.stp {setup_kfail 4105 *-*-*} buildok/twentyseven.stp {setup_kfail 4166 *-*-*} buildok/sched_test.stp {setup_kfail 1155 *-*-*} + buildok/process_test.stp {setup_kfail 1155 *-*-*} + buildok/rpc-all-probes.stp {setup_kfail 4413 *-*-*} + buildok/nfs-all-probes.stp {setup_kfail 4413 *-*-*} } if {$rc == 0} { pass $test } else { fail $test } } -- cgit From c6a65f69138016b9257fd9fcf15ed60e05ab4e3d Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 23 May 2008 11:30:26 -0400 Subject: tapset cleanup: nfs kernel?,module? -> kernel!,module --- tapset/ChangeLog | 4 ++ tapset/nfs.stp | 162 ++++++++++++++++++++++++++-------------------------- tapset/nfs_proc.stp | 3 + 3 files changed, 89 insertions(+), 80 deletions(-) diff --git a/tapset/ChangeLog b/tapset/ChangeLog index cc226a98..7514ba25 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,7 @@ +2008-05-23 Frank Ch. Eigler + + * nfs.stp (*): Similarly convert kernel?,module? -> kernel!,module. + 2008-05-23 Frank Ch. Eigler * rpc.stp (*): Convert kernel?,module? -> kernel!,module probe points. diff --git a/tapset/nfs.stp b/tapset/nfs.stp index ba6bde5f..474b091f 100644 --- a/tapset/nfs.stp +++ b/tapset/nfs.stp @@ -305,9 +305,9 @@ probe nfs.fop.entries = nfs.fop.llseek, nfs.fop.open, nfs.fop.flush, nfs.fop.release, + %( kernel_v <= "2.6.18" %? nfs.fop.sendfile, %) nfs.fop.fsync, - nfs.fop.lock, - nfs.fop.sendfile + nfs.fop.lock { } @@ -320,9 +320,9 @@ probe nfs.fop.return = nfs.fop.llseek.return, nfs.fop.open.return, nfs.fop.flush.return, nfs.fop.release.return, + %( kernel_v <= "2.6.18" %? nfs.fop.sendfile.return, %) nfs.fop.fsync.return, - nfs.fop.lock.return, - nfs.fop.sendfile.return + nfs.fop.lock.return { } @@ -344,8 +344,8 @@ probe nfs.fop.return = nfs.fop.llseek.return, * The offset is set to the size of the file plus offset bytes. * */ -probe nfs.fop.llseek = kernel.function ("nfs_file_llseek") ?, - module("nfs").function("nfs_file_llseek") ? +probe nfs.fop.llseek = kernel.function ("nfs_file_llseek") !, + module("nfs").function("nfs_file_llseek") { dev = __file_dev($filp) ino = __file_ino($filp) @@ -360,8 +360,8 @@ probe nfs.fop.llseek = kernel.function ("nfs_file_llseek") ?, argstr = sprintf("%d, %d", offset, origin) } -probe nfs.fop.llseek.return = kernel.function ("nfs_file_llseek").return ?, - module("nfs").function("nfs_file_llseek").return ? +probe nfs.fop.llseek.return = kernel.function ("nfs_file_llseek").return !, + module("nfs").function("nfs_file_llseek").return { name = "nfs.fop.llseek.return" retstr = sprintf("%d", $return) @@ -429,8 +429,8 @@ probe nfs.fop.write.return = vfs.do_sync_write.return * * jiffies - read_cache_jiffies > attrtimeo */ -probe nfs.fop.aio_read = kernel.function ("nfs_file_read") ?, - module("nfs").function("nfs_file_read") ? +probe nfs.fop.aio_read = kernel.function ("nfs_file_read") !, + module("nfs").function("nfs_file_read") { dev = __file_dev($iocb->ki_filp) ino = __file_ino($iocb->ki_filp) @@ -464,8 +464,8 @@ probe nfs.fop.aio_read = kernel.function ("nfs_file_read") ?, } -probe nfs.fop.aio_read.return = kernel.function ("nfs_file_read").return ?, - module("nfs").function("nfs_file_read").return ? +probe nfs.fop.aio_read.return = kernel.function ("nfs_file_read").return !, + module("nfs").function("nfs_file_read").return { name = "nfs.fop.aio_read.return" retstr = sprintf("%d", $return) @@ -490,8 +490,8 @@ probe nfs.fop.aio_read.return = kernel.function ("nfs_file_read").return ?, * file_name : file name * */ -probe nfs.fop.aio_write = kernel.function("nfs_file_write") ?, - module("nfs").function("nfs_file_write") ? +probe nfs.fop.aio_write = kernel.function("nfs_file_write") !, + module("nfs").function("nfs_file_write") { dev = __file_dev($iocb->ki_filp) ino = __file_ino($iocb->ki_filp) @@ -517,8 +517,8 @@ probe nfs.fop.aio_write = kernel.function("nfs_file_write") ?, units = "bytes" } -probe nfs.fop.aio_write.return = kernel.function("nfs_file_write").return ?, - module("nfs").function("nfs_file_write").return ? +probe nfs.fop.aio_write.return = kernel.function("nfs_file_write").return !, + module("nfs").function("nfs_file_write").return { name = "nfs.fop.aio_write.return" retstr = sprintf("%d", $return) @@ -551,8 +551,8 @@ probe nfs.fop.aio_write.return = kernel.function("nfs_file_write").return ?, * * jiffies - read_cache_jiffies > attrtimeo */ -probe nfs.fop.mmap = kernel.function("nfs_file_mmap") ?, - module("nfs").function("nfs_file_mmap") ? +probe nfs.fop.mmap = kernel.function("nfs_file_mmap") !, + module("nfs").function("nfs_file_mmap") { dev = __file_dev($file) ino = __file_ino($file) @@ -574,8 +574,8 @@ probe nfs.fop.mmap = kernel.function("nfs_file_mmap") ?, argstr = sprintf("0x%x, 0x%x, 0x%x", vm_start, vm_end, vm_flags) } -probe nfs.fop.mmap.return = kernel.function("nfs_file_mmap").return ?, - module("nfs").function("nfs_file_mmap").return ? +probe nfs.fop.mmap.return = kernel.function("nfs_file_mmap").return !, + module("nfs").function("nfs_file_mmap").return { name = "nfs.fop.mmap.return" retstr = sprintf("%d", $return) @@ -593,8 +593,8 @@ probe nfs.fop.mmap.return = kernel.function("nfs_file_mmap").return ?, * flag : file flag * i_size : file length in bytes */ -probe nfs.fop.open = kernel.function("nfs_file_open") ?, - module("nfs").function("nfs_file_open") ? +probe nfs.fop.open = kernel.function("nfs_file_open") !, + module("nfs").function("nfs_file_open") { dev = __file_dev($filp) ino = $inode->i_ino @@ -610,8 +610,8 @@ probe nfs.fop.open = kernel.function("nfs_file_open") ?, argstr = sprintf("%d,%d, %s", flag, ino, filename) } -probe nfs.fop.open.return = kernel.function("nfs_file_open").return ?, - module("nfs").function("nfs_file_open").return ? +probe nfs.fop.open.return = kernel.function("nfs_file_open").return !, + module("nfs").function("nfs_file_open").return { name = "nfs.fop.open.return" retstr = sprintf("%d", $return) @@ -628,8 +628,8 @@ probe nfs.fop.open.return = kernel.function("nfs_file_open").return ?, * mode : file mode * ndirty : number of dirty page */ -probe nfs.fop.flush = kernel.function("nfs_file_flush") ?, - module("nfs").function("nfs_file_flush") ? +probe nfs.fop.flush = kernel.function("nfs_file_flush") !, + module("nfs").function("nfs_file_flush") { dev = __file_dev($file) ino = __file_ino($file) @@ -643,8 +643,8 @@ probe nfs.fop.flush = kernel.function("nfs_file_flush") ?, argstr = sprintf("%d",ino) } -probe nfs.fop.flush.return = kernel.function("nfs_file_flush").return ?, - module("nfs").function("nfs_file_flush").return ? +probe nfs.fop.flush.return = kernel.function("nfs_file_flush").return !, + module("nfs").function("nfs_file_flush").return { name = "nfs.fop.flush.return" retstr = sprintf("%d",$return) @@ -660,8 +660,8 @@ probe nfs.fop.flush.return = kernel.function("nfs_file_flush").return ?, * ino : inode number * mode : file mode */ -probe nfs.fop.release = kernel.function("nfs_file_release") ?, - module("nfs").function("nfs_file_release") ? +probe nfs.fop.release = kernel.function("nfs_file_release") !, + module("nfs").function("nfs_file_release") { dev = __file_dev($filp) ino = $inode->i_ino @@ -674,8 +674,8 @@ probe nfs.fop.release = kernel.function("nfs_file_release") ?, argstr = sprintf("%d" , ino) } -probe nfs.fop.release.return = kernel.function("nfs_file_release").return ?, - module("nfs").function("nfs_file_release").return ? +probe nfs.fop.release.return = kernel.function("nfs_file_release").return !, + module("nfs").function("nfs_file_release").return { name = "nfs.fop.release.return" retstr = sprintf("%d", $return) @@ -691,8 +691,8 @@ probe nfs.fop.release.return = kernel.function("nfs_file_release").return ?, * ino : inode number * ndirty : number of dirty pages */ -probe nfs.fop.fsync = kernel.function("nfs_fsync") ?, - module("nfs").function("nfs_fsync") ? +probe nfs.fop.fsync = kernel.function("nfs_fsync") !, + module("nfs").function("nfs_fsync") { dev = __file_dev($file) ino = __file_ino($file) @@ -705,8 +705,8 @@ probe nfs.fop.fsync = kernel.function("nfs_fsync") ?, argstr = sprintf("%d",ino) } -probe nfs.fop.fsync.return = kernel.function("nfs_fsync").return ?, - module("nfs").function("nfs_fsync").return ? +probe nfs.fop.fsync.return = kernel.function("nfs_fsync").return !, + module("nfs").function("nfs_fsync").return { name = "nfs.fop.fsync.return" retstr = sprintf("%d", $return) @@ -727,8 +727,8 @@ probe nfs.fop.fsync.return = kernel.function("nfs_fsync").return ?, * fl_start : starting offset of locked region * fl_end : ending offset of locked region */ -probe nfs.fop.lock = kernel.function("nfs_lock") ?, - module("nfs").function("nfs_lock") ? +probe nfs.fop.lock = kernel.function("nfs_lock") !, + module("nfs").function("nfs_lock") { dev = __file_dev($filp) ino = __file_ino($filp) @@ -747,8 +747,8 @@ probe nfs.fop.lock = kernel.function("nfs_lock") ?, argstr = sprintf("%d,%d",cmd,i_mode) } -probe nfs.fop.lock.return = kernel.function("nfs_lock").return ?, - module("nfs").function("nfs_lock").return ? +probe nfs.fop.lock.return = kernel.function("nfs_lock").return !, + module("nfs").function("nfs_lock").return { name = "nfs.fop.lock.return" retstr = sprintf("%d",$return) @@ -773,8 +773,9 @@ probe nfs.fop.lock.return = kernel.function("nfs_lock").return ?, * * jiffies - read_cache_jiffies > attrtimeo */ -probe nfs.fop.sendfile = kernel.function("nfs_file_sendfile") ?, - module("nfs").function("nfs_file_sendfile") ? +%( kernel_v <= "2.6.18" %? +probe nfs.fop.sendfile = kernel.function("nfs_file_sendfile") !, + module("nfs").function("nfs_file_sendfile") { dev = __file_dev($filp) @@ -796,8 +797,8 @@ probe nfs.fop.sendfile = kernel.function("nfs_file_sendfile") ?, units = "bytes" } -probe nfs.fop.sendfile.return = kernel.function("nfs_file_sendfile").return ?, - module("nfs").function("nfs_file_sendfile").return ? +probe nfs.fop.sendfile.return = kernel.function("nfs_file_sendfile").return !, + module("nfs").function("nfs_file_sendfile").return { name = "nfs.fop.sendfile.return" retstr = sprintf("%d", $return) @@ -807,6 +808,7 @@ probe nfs.fop.sendfile.return = kernel.function("nfs_file_sendfile").return ?, units = "bytes" } } +%) /*probe nfs.fop.check_flags * @@ -816,8 +818,8 @@ probe nfs.fop.sendfile.return = kernel.function("nfs_file_sendfile").return ?, * Arguments: * flag : file flag */ -probe nfs.fop.check_flags = kernel.function("nfs_check_flags") ?, - module("nfs").function("nfs_check_flags") ? +probe nfs.fop.check_flags = kernel.function("nfs_check_flags") !, + module("nfs").function("nfs_check_flags") { flag = $flags @@ -825,8 +827,8 @@ probe nfs.fop.check_flags = kernel.function("nfs_check_flags") ?, argstr = sprintf("%d",flag) } -probe nfs.fop.check_flags.return = kernel.function("nfs_check_flags").return ?, - module("nfs").function("nfs_check_flags").return ? +probe nfs.fop.check_flags.return = kernel.function("nfs_check_flags").return !, + module("nfs").function("nfs_check_flags").return { name = "nfs.fop.check_flags.return" retstr = sprintf("%d",$return) @@ -871,8 +873,8 @@ probe nfs.aop.return = nfs.aop.readpage.return, * rsize : read size (in bytes) * size : number of pages to be read in this execution */ -probe nfs.aop.readpage = kernel.function ("nfs_readpage") ?, - module("nfs").function ("nfs_readpage") ? +probe nfs.aop.readpage = kernel.function ("nfs_readpage") !, + module("nfs").function ("nfs_readpage") { __page = $page dev = __page_dev(__page) @@ -896,8 +898,8 @@ probe nfs.aop.readpage = kernel.function ("nfs_readpage") ?, units = "pages" } -probe nfs.aop.readpage.return = kernel.function ("nfs_readpage").return ?, - module("nfs").function ("nfs_readpage").return ? +probe nfs.aop.readpage.return = kernel.function ("nfs_readpage").return !, + module("nfs").function ("nfs_readpage").return { name = "nfs.aop.readpage.return" retstr = sprintf("%d", $return) @@ -918,8 +920,8 @@ probe nfs.aop.readpage.return = kernel.function ("nfs_readpage").return ?, * rsize : read size (in bytes) * size : number of pages attempted to read in this execution */ -probe nfs.aop.readpages = kernel.function ("nfs_readpages") ?, - module("nfs").function ("nfs_readpages") ? +probe nfs.aop.readpages = kernel.function ("nfs_readpages") !, + module("nfs").function ("nfs_readpages") { dev = $mapping->host->i_sb->s_dev ino = $mapping->host->i_ino @@ -937,8 +939,8 @@ probe nfs.aop.readpages = kernel.function ("nfs_readpages") ?, units = "pages" } -probe nfs.aop.readpages.return = kernel.function ("nfs_readpages").return ?, - module("nfs").function ("nfs_readpages").return ? +probe nfs.aop.readpages.return = kernel.function ("nfs_readpages").return !, + module("nfs").function ("nfs_readpages").return { name = "nfs.aop.readpages.return" retstr = sprintf("%d", $return) @@ -960,8 +962,8 @@ probe nfs.aop.readpages.return = kernel.function ("nfs_readpages").return ?, * page_flag : page flags */ probe nfs.aop.set_page_dirty = - kernel.function ("__set_page_dirty_nobuffers") ?, - module("nfs").function ("__set_page_dirty_nobuffers") ? + kernel.function ("__set_page_dirty_nobuffers") !, + module("nfs").function ("__set_page_dirty_nobuffers") { /* dev = $mapping->host->i_sb->s_dev devname = __find_bdevname(dev, $mapping->host->i_sb->s_bdev) @@ -975,8 +977,8 @@ probe nfs.aop.set_page_dirty = } probe nfs.aop.set_page_dirty.return = - kernel.function ("__set_page_dirty_nobuffers") .return?, - module("nfs").function ("__set_page_dirty_nobuffers").return ? + kernel.function ("__set_page_dirty_nobuffers") .return !, + module("nfs").function ("__set_page_dirty_nobuffers").return { name = "nfs.aop.set_page_dirty.return" retstr = sprintf("%d", $return) @@ -1003,8 +1005,8 @@ probe nfs.aop.set_page_dirty.return = * wsize : write size * size : number of pages to be written in this execution */ -probe nfs.aop.writepage = kernel.function ("nfs_writepage") ?, - module("nfs").function ("nfs_writepage") ? +probe nfs.aop.writepage = kernel.function ("nfs_writepage") !, + module("nfs").function ("nfs_writepage") { __page = $page dev = __page_dev(__page) @@ -1033,8 +1035,8 @@ probe nfs.aop.writepage = kernel.function ("nfs_writepage") ?, units = "pages" } -probe nfs.aop.writepage.return = kernel.function ("nfs_writepage").return ?, - module("nfs").function ("nfs_writepage").return ? +probe nfs.aop.writepage.return = kernel.function ("nfs_writepage").return !, + module("nfs").function ("nfs_writepage").return { name = "nfs.aop.writepage.return" retstr = sprintf("%d", $return) @@ -1053,8 +1055,8 @@ probe nfs.aop.writepage.return = kernel.function ("nfs_writepage").return ?, * nr_to_write : number of pages attempted to be written in this execution * size : number of pages attempted to be written in this execution */ -probe nfs.aop.writepages = kernel.function ("nfs_writepages") ?, - module("nfs").function ("nfs_writepages") ? +probe nfs.aop.writepages = kernel.function ("nfs_writepages") !, + module("nfs").function ("nfs_writepages") { dev = $mapping->host->i_sb->s_dev ino = $mapping->host->i_ino @@ -1073,8 +1075,8 @@ probe nfs.aop.writepages = kernel.function ("nfs_writepages") ?, units = "pages" } -probe nfs.aop.writepages.return = kernel.function ("nfs_writepages").return ?, - module("nfs").function ("nfs_writepages").return ? +probe nfs.aop.writepages.return = kernel.function ("nfs_writepages").return !, + module("nfs").function ("nfs_writepages").return { name = "nfs.aop.writepages.return" retstr = sprintf("%d", $return) @@ -1099,8 +1101,8 @@ probe nfs.aop.writepages.return = kernel.function ("nfs_writepages").return ?, in the page frame * size : write bytes */ -probe nfs.aop.prepare_write= kernel.function ("nfs_prepare_write") ?, - module("nfs").function ("nfs_prepare_write") ? +probe nfs.aop.prepare_write= kernel.function ("nfs_prepare_write") !, + module("nfs").function ("nfs_prepare_write") { __page = $page dev = __page_dev(__page) @@ -1120,8 +1122,8 @@ probe nfs.aop.prepare_write= kernel.function ("nfs_prepare_write") ?, } probe nfs.aop.prepare_write.return = - kernel.function ("nfs_prepare_write").return ?, - module("nfs").function ("nfs_prepare_write").return ? + kernel.function ("nfs_prepare_write").return !, + module("nfs").function ("nfs_prepare_write").return { name = "nfs.aop.prepare_write.return" retstr = sprintf("%d", $return) @@ -1147,8 +1149,8 @@ probe nfs.aop.prepare_write.return = in the page frame * size : write bytes */ -probe nfs.aop.commit_write= kernel.function ("nfs_commit_write") ?, - module("nfs").function ("nfs_commit_write") ? +probe nfs.aop.commit_write= kernel.function ("nfs_commit_write") !, + module("nfs").function ("nfs_commit_write") { __page = $page dev = __page_dev(__page) @@ -1174,8 +1176,8 @@ probe nfs.aop.commit_write= kernel.function ("nfs_commit_write") ?, probe nfs.aop.commit_write.return= - kernel.function ("nfs_commit_write").return ?, - module("nfs").function ("nfs_commit_write").return? + kernel.function ("nfs_commit_write").return !, + module("nfs").function ("nfs_commit_write").return { name = "nfs.aop.commit_write.return" retstr = sprintf("%d", $return) @@ -1194,8 +1196,8 @@ probe nfs.aop.commit_write.return= in the page frame * size : release pages */ -probe nfs.aop.release_page = kernel.function ("nfs_release_page") ?, - module("nfs").function ("nfs_release_page")? +probe nfs.aop.release_page = kernel.function ("nfs_release_page") !, + module("nfs").function ("nfs_release_page") { __page = $page dev = __page_dev(__page) @@ -1212,8 +1214,8 @@ probe nfs.aop.release_page = kernel.function ("nfs_release_page") ?, } -probe nfs.aop.release_page.return = kernel.function ("nfs_release_page").return ?, - module("nfs").function ("nfs_release_page").return? +probe nfs.aop.release_page.return = kernel.function ("nfs_release_page").return !, + module("nfs").function ("nfs_release_page").return { name = "nfs.aop.release_page.return" retstr = sprintf("%d", $return) diff --git a/tapset/nfs_proc.stp b/tapset/nfs_proc.stp index 2dc7e659..6ffdf646 100644 --- a/tapset/nfs_proc.stp +++ b/tapset/nfs_proc.stp @@ -559,6 +559,9 @@ probe nfs.proc.commit.return = nfs.proc3.commit.return, nfs.proc4.commit.return {} +// XXX: on kernels > 2.6.18 (?), module("nfs") -> module("nfsd") and +// function("nfsN...") becomes function("nfsdN..."). PR3833. + probe nfs.proc3.commit = kernel.function ("nfs3_proc_commit")?, module("nfs").function("nfs3_proc_commit")? { -- cgit From 29d69c3ece42012eeed596835bcc22d278e4a3cc Mon Sep 17 00:00:00 2001 From: Jim Keniston Date: Fri, 23 May 2008 11:44:50 -0700 Subject: Address powerpc dwarfless test failures. --- ChangeLog | 7 +++++++ tapsets.cxx | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 57 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43d2b479..0db1ca55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-23 Jim Keniston + + PR 4311, cont. Address powerpc dwarfless test failures. + * tapsets.cxx: Convert .funcname to funcname when adding it + to our symbol table. Accept all weak symbols except those + that map to sys_ni_syscall. + 2008-05-23 Srinivasa DS PR 6429: Inerim fix to avoid compilation error of systemtap module * runtime/transport/symbols.c: added definitions of struct diff --git a/tapsets.cxx b/tapsets.cxx index 96999d26..8203c568 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -472,7 +472,7 @@ struct func_info { func_info() - : decl_file(NULL), decl_line(-1), addr(0), prologue_end(0) + : decl_file(NULL), decl_line(-1), addr(0), prologue_end(0), weak(false) { memset(&die, 0, sizeof(die)); } @@ -482,6 +482,7 @@ func_info Dwarf_Die die; Dwarf_Addr addr; Dwarf_Addr prologue_end; + bool weak; }; struct @@ -560,12 +561,14 @@ symbol_table map map_by_name; vector list_by_addr; - void add_symbol(const char *name, Dwarf_Addr addr, Dwarf_Addr *high_addr); + void add_symbol(const char *name, bool weak, Dwarf_Addr addr, + Dwarf_Addr *high_addr); enum info_status read_symbols(FILE *f, const string& path); enum info_status read_from_elf_file(const string& path); enum info_status read_from_text_file(const string& path); enum info_status get_from_elf(); void mark_dwarf_redundancies(dwflpp *dw); + void purge_syscall_stubs(); func_info *lookup_symbol(const string& name); Dwarf_Addr lookup_symbol_address(const string& name); func_info *get_func_containing_address(Dwarf_Addr addr); @@ -4696,12 +4699,18 @@ symbol_table::~symbol_table() } void -symbol_table::add_symbol(const char *name, Dwarf_Addr addr, - Dwarf_Addr *high_addr) +symbol_table::add_symbol(const char *name, bool weak, Dwarf_Addr addr, + Dwarf_Addr *high_addr) { +#ifdef __powerpc__ + // Map ".sys_foo" to "sys_foo". + if (name[0] == '.') + name++; +#endif func_info *fi = new func_info(); fi->addr = addr; fi->name = name; + fi->weak = weak; map_by_name[fi->name] = fi; // TODO: Use a multimap in case there are multiple static // functions with the same name? @@ -4752,8 +4761,8 @@ symbol_table::read_symbols(FILE *f, const string& path) free(mod); goto done; } - if (type == 'T' || type == 't') - add_symbol(name, (Dwarf_Addr) addr, &high_addr); + if (type == 'T' || type == 't' || type == 'W') + add_symbol(name, (type == 'W'), (Dwarf_Addr) addr, &high_addr); free(name); } @@ -4818,9 +4827,11 @@ symbol_table::get_from_elf() for (int i = 1; i < syments; ++i) { GElf_Sym sym; - const char *name = dwfl_module_getsym(mod, i, &sym, NULL); - if (name && GELF_ST_TYPE(sym.st_info) == STT_FUNC) - add_symbol(name, sym.st_value, &high_addr); + GElf_Word section; + const char *name = dwfl_module_getsym(mod, i, &sym, §ion); + if (name && GELF_ST_TYPE(sym.st_info) == STT_FUNC && section != SHN_UNDEF) + add_symbol(name, (GELF_ST_BIND(sym.st_info) == STB_WEAK), + sym.st_value, &high_addr); } return info_present; } @@ -4912,6 +4923,33 @@ symbol_table::lookup_symbol_address(const string& name) return 0; } +// This is the kernel symbol table. The kernel macro cond_syscall creates +// a weak symbol for each system call and maps it to sys_ni_syscall. +// For system calls not implemented elsewhere, this weak symbol shows up +// in the kernel symbol table. Following the precedent of dwarfful stap, +// we refuse to consider such symbols. Here we delete them from our +// symbol table. +// TODO: Consider generalizing this and/or making it part of blacklist +// processing. +void +symbol_table::purge_syscall_stubs() +{ + Dwarf_Addr stub_addr = lookup_symbol_address("sys_ni_syscall"); + if (stub_addr == 0) + return; + for (size_t i = 0; i < list_by_addr.size(); i++) + { + func_info *fi = list_by_addr.at(i); + if (fi->weak && fi->addr == stub_addr && fi->name != "sys_ni_syscall") + { + list_by_addr.erase(list_by_addr.begin()+i); + map_by_name.erase(fi->name); + delete fi; + i--; + } + } +} + void module_info::get_symtab(dwarf_query *q) { @@ -4967,6 +5005,9 @@ module_info::get_symtab(dwarf_query *q) // precedes the call to query_module_symtab(). So we should never read // a module's symbol table without first having tried to get its dwarf. sym_table->mark_dwarf_redundancies(&q->dw); + + if (name == TOK_KERNEL) + sym_table->purge_syscall_stubs(); } module_info::~module_info() -- cgit From 12b7f110bc79aac307cd4c6fa73402235ec00ea3 Mon Sep 17 00:00:00 2001 From: Jim Keniston Date: Fri, 23 May 2008 13:14:19 -0700 Subject: Fixed arg #3 type in nd_syscall.accept. --- tapset/nd_syscalls.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tapset/nd_syscalls.stp b/tapset/nd_syscalls.stp index 5697cd21..5a258e75 100644 --- a/tapset/nd_syscalls.stp +++ b/tapset/nd_syscalls.stp @@ -46,7 +46,7 @@ probe nd_syscall.accept = kernel.function("sys_accept") ? { asmlinkage() sockfd = int_arg(1) addr_uaddr = pointer_arg(2) - addrlen_uaddr = int_arg(3) + addrlen_uaddr = pointer_arg(3) argstr = sprintf("%d, %p, %p", sockfd, addr_uaddr, addrlen_uaddr) } probe nd_syscall.accept.return = kernel.function("sys_accept").return ? { -- cgit From f98f7c0151e19f6f3689c5e4001f3fae37efb293 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sat, 24 May 2008 00:41:06 -0400 Subject: PR6550: --enable-dejazilla: optional automatic test result reporting --- Makefile.in | 2 ++ doc/Makefile.in | 2 ++ testsuite/ChangeLog | 7 +++++++ testsuite/Makefile.am | 18 ++++++++++++++---- testsuite/Makefile.in | 44 +++++++++++++++++++++++++------------------- testsuite/configure | 25 ++++++++++++++++++++++++- testsuite/configure.ac | 15 +++++++++++++++ testsuite/execrc | 5 +++++ 8 files changed, 94 insertions(+), 24 deletions(-) create mode 100755 testsuite/execrc diff --git a/Makefile.in b/Makefile.in index 8ff882b4..b5496252 100644 --- a/Makefile.in +++ b/Makefile.in @@ -176,6 +176,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -234,6 +235,7 @@ builddir = @builddir@ cap_LIBS = @cap_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ +dejazilla = @dejazilla@ docdir = @docdir@ dvidir = @dvidir@ elfutils_abs_srcdir = @elfutils_abs_srcdir@ diff --git a/doc/Makefile.in b/doc/Makefile.in index a2700d3c..689ddeec 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -55,6 +55,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -113,6 +114,7 @@ builddir = @builddir@ cap_LIBS = @cap_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ +dejazilla = @dejazilla@ docdir = @docdir@ dvidir = @dvidir@ elfutils_abs_srcdir = @elfutils_abs_srcdir@ diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 841dc8e3..e15f5b3d 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-05-24 Frank Ch. Eigler + + * configure.ac (enable-dejazilla): Add option, default off. + * Makefile.am (*check): Send systemtap.sum to dejazilla if enabled$a + * execrc: New helper script for runtest rc overriding. + * configure, Makefile.in: Regenerated. + 2008-05-23 Frank Ch. Eigler * buildok/{nfs,rpc}-all-probes.stp: Suppress warnings from empty probe diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index edaaff3c..aedfe447 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -3,16 +3,24 @@ AUTOMAKE_OPTIONS = dejagnu -# The stap symlink is to enable "#! stap" test scripts. all-local: @echo Run \"make check\" or \"make installcheck\". + @if test -n "$(DEJAZILLA)"; then echo Test results will be emailed to $(DEJAZILLA); fi clean-local: -rm -f ./stap site.exp systemtap.sum systemtap.log -rm -rf .systemtap .cache_test 2>/dev/null -installcheck-local: clean site.exp - $(MAKE) AM_RUNTESTFLAGS="--tool_opts install" check-DEJAGNU +DEJAZILLA=@dejazilla@ + +# automake's dejagnu library already runs check-DEJAGNU before check-local +check-local: + if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi + +# but installcheck does not follow an implicit check-DEJAGNU, go figure +installcheck: clean site.exp + -$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU RUNTESTFLAGS="$(RUNTESTFLAGS) --tool_opts install" + if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi SRCDIR = $(shell cd $(srcdir); pwd) @@ -30,4 +38,6 @@ LD_LIBRARY_PATH=$(DESTDIR)$(libdir)/systemtap CRASH_LIBDIR=$(DESTDIR)$(libdir)/systemtap SYSTEMTAP_PATH=$(DESTDIR)$(bindir) -RUNTEST="env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH runtest" +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXPECT = expect +RUNTEST="env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH $(srcdir)/execrc runtest" diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 99acf141..2858d2bb 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -49,8 +49,6 @@ CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DEJATOOL = $(PACKAGE) -RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir -EXPECT = expect DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -107,6 +105,7 @@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +dejazilla = @dejazilla@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -134,6 +133,7 @@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = dejagnu +DEJAZILLA = @dejazilla@ SRCDIR = $(shell cd $(srcdir); pwd) EXTRA_DIST = config lib systemtap \ parseok parseko semok semko transok transko buildok buildok \ @@ -149,7 +149,9 @@ SYSTEMTAP_TAPSET = $(DESTDIR)$(pkgdatadir)/tapset LD_LIBRARY_PATH = $(DESTDIR)$(libdir)/systemtap CRASH_LIBDIR = $(DESTDIR)$(libdir)/systemtap SYSTEMTAP_PATH = $(DESTDIR)$(bindir) -RUNTEST = "env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH runtest" +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXPECT = expect +RUNTEST = "env SYSTEMTAP_RUNTIME=$(SYSTEMTAP_RUNTIME) SYSTEMTAP_TAPSET=$(SYSTEMTAP_TAPSET) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) CRASH_LIBDIR=$(CRASH_LIBDIR) PATH=$(SYSTEMTAP_PATH):$$PATH $(srcdir)/execrc runtest" all: all-am .SUFFIXES: @@ -351,7 +353,7 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check-local check: check-am all-am: Makefile all-local installdirs: @@ -362,8 +364,6 @@ uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -414,7 +414,7 @@ install-pdf: install-pdf-am install-ps: install-ps-am -installcheck-am: installcheck-local +installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -439,30 +439,36 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am all-local am--refresh check check-DEJAGNU check-am \ - clean clean-generic clean-local dist dist-all dist-bzip2 \ - dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-DEJAGNU distclean-generic distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installcheck-local \ + check-local clean clean-generic clean-local dist dist-all \ + dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-DEJAGNU distclean-generic distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am -# The stap symlink is to enable "#! stap" test scripts. all-local: @echo Run \"make check\" or \"make installcheck\". + @if test -n "$(DEJAZILLA)"; then echo Test results will be emailed to $(DEJAZILLA); fi clean-local: -rm -f ./stap site.exp systemtap.sum systemtap.log -rm -rf .systemtap .cache_test 2>/dev/null -installcheck-local: clean site.exp - $(MAKE) AM_RUNTESTFLAGS="--tool_opts install" check-DEJAGNU +# automake's dejagnu library already runs check-DEJAGNU before check-local +check-local: + if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi + +# but installcheck does not follow an implicit check-DEJAGNU, go figure +installcheck: clean site.exp + -$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU RUNTESTFLAGS="$(RUNTESTFLAGS) --tool_opts install" + if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/testsuite/configure b/testsuite/configure index bd8237cb..93494726 100755 --- a/testsuite/configure +++ b/testsuite/configure @@ -640,6 +640,7 @@ am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT +dejazilla LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -1223,6 +1224,11 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-dejazilla[=EMAIL] + enable dejazilla support to automatically email test + results to a central public collection point + (default is disabled). Optional EMAIL overrides the + default email address. Report bugs to . _ACEOF @@ -2160,6 +2166,22 @@ fi +# Check whether --enable-dejazilla was given. +if test "${enable_dejazilla+set}" = set; then + enableval=$enable_dejazilla; +fi + +case "$enable_dejazilla" in + no) dejazilla= ;; + yes) dejazilla=dejazilla@elastic.org ;; + *) dejazilla="$enable_dejazilla" ;; +esac +if test -n "$dejazilla"; then + { echo "$as_me:$LINENO: A \"make *check\" will email results to $dejazilla" >&5 +echo "$as_me: A \"make *check\" will email results to $dejazilla" >&6;} +fi + + ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF @@ -2861,11 +2883,12 @@ am__untar!$am__untar$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim +dejazilla!$dejazilla$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/testsuite/configure.ac b/testsuite/configure.ac index 70d01e96..0fd78fe7 100644 --- a/testsuite/configure.ac +++ b/testsuite/configure.ac @@ -8,5 +8,20 @@ AC_CONFIG_AUX_DIR(..) AM_INIT_AUTOMAKE([dejagnu foreign]) AM_MAINTAINER_MODE +AC_ARG_ENABLE([dejazilla], + AS_HELP_STRING([--enable-dejazilla@<:@=EMAIL@:>@], + [enable dejazilla support to automatically email test results to a + central public collection point (default is disabled). Optional + EMAIL overrides the default email address.])) +case "$enable_dejazilla" in + no) dejazilla= ;; + yes) dejazilla=dejazilla@elastic.org ;; + *) dejazilla="$enable_dejazilla" ;; +esac +if test -n "$dejazilla"; then + AC_MSG_NOTICE([A "make *check" will email results to $dejazilla]) +fi +AC_SUBST(dejazilla) + AC_CONFIG_FILES(Makefile) AC_OUTPUT diff --git a/testsuite/execrc b/testsuite/execrc new file mode 100755 index 00000000..deff87e7 --- /dev/null +++ b/testsuite/execrc @@ -0,0 +1,5 @@ +#! /bin/sh + +# Run given program, but return a successful rc anyway. +eval $@ +exit 0 -- cgit From 62d1ce855d0d35316d30e303df828c1f3636ae0b Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sat, 24 May 2008 00:46:28 -0400 Subject: PR6550: also EXTRA_DIST the little "execrc" helper script file --- testsuite/Makefile.am | 2 +- testsuite/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index aedfe447..96f33200 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -24,7 +24,7 @@ installcheck: clean site.exp SRCDIR = $(shell cd $(srcdir); pwd) -EXTRA_DIST = config lib systemtap \ +EXTRA_DIST = execrc config lib systemtap \ parseok parseko semok semko transok transko buildok buildok \ systemtap.syscall systemtap.stress systemtap.string \ systemtap.pass1-4 systemtap.samples systemtap.printf \ diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 2858d2bb..08c471fa 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -135,7 +135,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = dejagnu DEJAZILLA = @dejazilla@ SRCDIR = $(shell cd $(srcdir); pwd) -EXTRA_DIST = config lib systemtap \ +EXTRA_DIST = execrc config lib systemtap \ parseok parseko semok semko transok transko buildok buildok \ systemtap.syscall systemtap.stress systemtap.string \ systemtap.pass1-4 systemtap.samples systemtap.printf \ -- cgit From d9d3b3a1f75858c1e7a2b00adc34455a047598a8 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sat, 24 May 2008 07:00:56 -0400 Subject: PR6550: add comment justifying "execrc" --- testsuite/Makefile.am | 2 ++ testsuite/Makefile.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 96f33200..2602a162 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -14,6 +14,8 @@ clean-local: DEJAZILLA=@dejazilla@ # automake's dejagnu library already runs check-DEJAGNU before check-local +# That's why we need to add "execrc" to $(RUNTEST) - to ensure that this +# subtarget gets run even if runtest per se exits with a failure. check-local: if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 08c471fa..cc76cada 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -462,6 +462,8 @@ clean-local: -rm -rf .systemtap .cache_test 2>/dev/null # automake's dejagnu library already runs check-DEJAGNU before check-local +# That's why we need to add "execrc" to $(RUNTEST) - to ensure that this +# subtarget gets run even if runtest per se exits with a failure. check-local: if test -n "$(DEJAZILLA)"; then mail $(DEJAZILLA) < systemtap.sum; fi -- cgit