From 38975255091d0c6bc33ae3c6907bb7886b70598d Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 25 Feb 2010 16:29:50 -0600 Subject: Fixed pr 10690 by adding '.maxsize(NNN)' procfs read probe parameter. * tapset-procfs.cxx (procfs_derived_probe::procfs_derived_probe): Added 'maxsize_val' initialization. (procfs_derived_probe::join_group): Updated '_stp_procfs_data' definition and added STP_PROCFS_BUFSIZE. (procfs_derived_probe_group::emit_module_decls): Emits structure to contain procfs file buffers. Initializes '.bufsize' structure member. (procfs_var_expanding_visitor::visit_target_symbol): Uses 'bufsize' for maximum buffer size instead of using MAXSTRINGLEN. (procfs_builder::build): Looks for '.maxsize(NNN)' parameter. (register_tapset_procfs): Added '.maxsize(NNN)' parameter binding. * runtime/procfs-probes.c (stap_procfs_probe): Converted 'buffer' to a pointer and added 'bufsize' member. * testsuite/semko/procfs13.stp: New testcase. * testsuite/semko/procfs14.stp: Ditto. * testsuite/semko/procfs15.stp: Ditto. * testsuite/systemtap.base/procfs_maxsize.exp: Ditto. * testsuite/systemtap.base/procfs.exp: Minor fix. * stapprobes.3stap.in: Added '.maxsize(NNN)' documentation. * stap.1.in: Added STP_PROCFS_BUFSIZE documentation. --- testsuite/semko/procfs13.stp | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 testsuite/semko/procfs13.stp (limited to 'testsuite/semko/procfs13.stp') diff --git a/testsuite/semko/procfs13.stp b/testsuite/semko/procfs13.stp new file mode 100755 index 00000000..8b5b64f1 --- /dev/null +++ b/testsuite/semko/procfs13.stp @@ -0,0 +1,4 @@ +#! stap -p2 + +# no maxsize value +probe procfs.read.maxsize { $value = "foo" } -- cgit