]> sourceware.org Git - systemtap.git/log
systemtap.git
15 years agoWorkaround cfa_nops not being needed on earlier elfutils.
Mark Wielaard [Thu, 23 Jul 2009 10:02:11 +0000 (12:02 +0200)]
Workaround cfa_nops not being needed on earlier elfutils.

* dwflpp.cxx (get_cfa_ops): Only define cfa_nops if _ELFUTILS_PREREQ(0,142).
* loc2c-test.c (main): Likewise.

15 years agoAdjust to new elfutils dwarf_frame_cfa interface.
Mark Wielaard [Thu, 23 Jul 2009 09:53:03 +0000 (11:53 +0200)]
Adjust to new elfutils dwarf_frame_cfa interface.

* dwflpp.cxx (get_cfa_ops): Call dwarf_frame_cfa with cfa_nops size_t.
* loc2c-test.c (main): Likewise.

15 years agoMake ring_buffer transport work on new kernels.
David Smith [Wed, 22 Jul 2009 19:42:18 +0000 (14:42 -0500)]
Make ring_buffer transport work on new kernels.
* runtime/transport/ring_buffer.c (_stp_event_to_user): Added debug prints.
  (_stp_ring_buffer_consume): New function.
  (_stp_find_next_event): Avoid incrementing the buffer iterator here.
  (_stp_data_write_commit): Added debug prints.

15 years agoPR10427 Multiple tracepoints OK!
Mark Wielaard [Wed, 22 Jul 2009 12:59:54 +0000 (14:59 +0200)]
PR10427 Multiple tracepoints OK!

* testsuite/systemtap.base/tracepoints.stp: Only print once, when enough hits,
  or at the begin probe.

15 years agoUse the query paradigm for resolving sdt probes
Josh Stone [Wed, 22 Jul 2009 02:21:56 +0000 (19:21 -0700)]
Use the query paradigm for resolving sdt probes

There was a bad assumption in the probe_table initialization that the
dwflpp->module would be immediately valid.  We should not assume that
dwflpp only has one module, or that any module is necessarily in focus.

Instead, I've created an sdt_query class which will call an
iterate_over_modules like the other dwarf probe types.  For now this
means just a single module, but it will also open the door to iterating
over all linked libraries too, for example.

* dwflpp.cxx (dwflpp::setup_user): don't "save mod!" anymore
* tapsets.cxx (probe_table -> sdt_query): convert to a query-style
  class, and also take over the task of iterating over the probes.
  (dwarf_builder::build): leave the iteration to sdt_query

15 years agoRemove unused 'sess' from dwarf_query ctor
Josh Stone [Tue, 21 Jul 2009 21:35:25 +0000 (14:35 -0700)]
Remove unused 'sess' from dwarf_query ctor

15 years agoPR10421: Update task.stp for 2.6.31
Wenji Huang [Tue, 21 Jul 2009 20:24:10 +0000 (16:24 -0400)]
PR10421: Update task.stp for 2.6.31

* tapset/task.stp (pid2task): Use find_get_pid for 2.6.31.

15 years agoPR10182 systemtap.spec should try to clean up old leftover uprobes module.
Mark Wielaard [Tue, 21 Jul 2009 20:01:39 +0000 (22:01 +0200)]
PR10182 systemtap.spec should try to clean up old leftover uprobes module.

systemtap.spec (post,preun): Call rmmod uprobes.

15 years agoSave module when dwflpp setup_user.
Mark Wielaard [Tue, 21 Jul 2009 11:17:26 +0000 (13:17 +0200)]
Save module when dwflpp setup_user.

* dwflpp.cxx (setup_user): Set module to mod.

15 years agoPR10424: Consider each tracepoint header separately
Josh Stone [Tue, 21 Jul 2009 01:01:40 +0000 (18:01 -0700)]
PR10424: Consider each tracepoint header separately

With the current monolithic tracepoint query module, a failure in any of
the discovered tracepoint headers means that you can't use any of the
others either.  This patch creates a separate query module for each
header so they can pass or fail independently.

* buildrun.cxx (make_tracequery): take a single header name instead of
  globbing for everything we can find.
* hash.cxx (find_tracequery_hash): name the header file we're hashing.
* tapsets.cxx (tracepoint_query::handle_query_func): make sure we don't
  duplicate tracepoints found through different headers.
  (tracepoint_builder::get_tracequery_module): get a header's module
  (tracepoint_builder::init_dw): glob for all tracepoint headers, and
  feed all their modules into dwflpp.

15 years agoMake sure that non-existent files still affect hashing
Josh Stone [Tue, 21 Jul 2009 00:57:56 +0000 (17:57 -0700)]
Make sure that non-existent files still affect hashing

The fact that a file _doesn't_ exist is significant, so adding such a
file to a computed hash should still influence the output.

* hash.cxx (hash::add_file): add bogus stat info for non-existent files

15 years agoAllow dwflpp to take a vector of module names
Josh Stone [Mon, 20 Jul 2009 23:32:33 +0000 (16:32 -0700)]
Allow dwflpp to take a vector of module names

This will be used to load tracepoint modules as a bunch of little query
modules into a single dwflpp.

* dwflpp.cxx (setup_user): take a vector instead of a single module
  (dwflpp::dwflpp): form a vector in the singular case, and add a
  variant that takes and passes through a vector of modules.

15 years agoReturn hash module values directly as strings
Josh Stone [Mon, 20 Jul 2009 23:25:35 +0000 (16:25 -0700)]
Return hash module values directly as strings

* session.h (systemtap_session): remove tracequery_path
* hash.cxx (find_tracequery_hash, find_typequery_hash): return strings
* tapsets.cxx (dwarf_cast_expanding_visitor::filter_special_modules):
  get the hashed path from the return value instead of a parameter
  (tracepoint_builder::init_dw): ditto, and don't stuff it in session

15 years agoFixes for 2.6.31. There are some changes in sk_buff structure those cause
David J. Wilder [Mon, 20 Jul 2009 23:08:42 +0000 (16:08 -0700)]
Fixes for 2.6.31.  There are some changes in sk_buff structure those cause
failures of compiling ipmib.stp and tcpmib.stp, rtable and dst fields are
deleted.

15 years agoFixed PR 10386 by removing the need to convert a pid to a task.
David Smith [Mon, 20 Jul 2009 20:25:01 +0000 (15:25 -0500)]
Fixed PR 10386 by removing the need to convert a pid to a task.
* runtime/itrace.c (usr_itrace_init): Changed prototype to take a
  task_struct instead of a pid.
* tapset-itrace.cxx (emit_module_decls): Updated usr_itrace_init() call.
* runtime/autoconf-find-task-pid.c: Removed, since only user_itrace_init()
  was using it.
* buildrun.cxx (compile_pass): Removed autoconf-find-task-pid.c test.

15 years ago* tapsets.cxx (dwarf_builder::probe_table::convert_probe):
Stan Cox [Mon, 20 Jul 2009 14:20:23 +0000 (10:20 -0400)]
* tapsets.cxx (dwarf_builder::probe_table::convert_probe):
First check kprobe and utrace (did we arrive via stap?) then check
if probe arg matches mark("NAME")
* sdt.h (STAP_PROBE?_): Use STAP_GUARD for stap check, not gettid.

15 years agoTweak kernel or module resident probe
Wenji Huang [Mon, 20 Jul 2009 02:03:45 +0000 (22:03 -0400)]
Tweak kernel or module resident probe

* tapset/nfs_proc.stp: Change '?' notation to "!".
* tapset/nfsd.stp: Ditto.
* tapset/scsi.stp: Ditto.

15 years agominor typo
Don Domingo [Mon, 20 Jul 2009 03:16:47 +0000 (13:16 +1000)]
minor typo

15 years agorevising for brew build
Don Domingo [Mon, 20 Jul 2009 01:42:33 +0000 (11:42 +1000)]
revising for brew build

15 years agominor revisions to language
Don Domingo [Mon, 20 Jul 2009 00:59:30 +0000 (10:59 +1000)]
minor revisions to language

15 years agoPR6961: gcc warning tweak
Frank Ch. Eigler [Fri, 17 Jul 2009 22:52:04 +0000 (18:52 -0400)]
PR6961: gcc warning tweak

* sym.c (_stp_usymbol_print): Ditto.

15 years agoregenerate example indexes
Frank Ch. Eigler [Fri, 17 Jul 2009 22:05:25 +0000 (18:05 -0400)]
regenerate example indexes

15 years agoPR6961: gcc warning tweak
Frank Ch. Eigler [Fri, 17 Jul 2009 22:04:24 +0000 (18:04 -0400)]
PR6961: gcc warning tweak

* sym.c (_stp_symbol_print): (Redundantly) initialize locals.

15 years agoUpdate AUTHORS and .mailmap
Josh Stone [Fri, 17 Jul 2009 21:55:19 +0000 (14:55 -0700)]
Update AUTHORS and .mailmap

* AUTHORS: Add David J. Wilder and Jeff Moyer.
* .mailmap: Add a real name for <wjhuang@localhost.localdomain>

15 years agosave_stack_trace autoconf: fix typo to activate code in runtime/stack.c
Frank Ch. Eigler [Fri, 17 Jul 2009 21:56:48 +0000 (17:56 -0400)]
save_stack_trace autoconf: fix typo to activate code in runtime/stack.c

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Frank Ch. Eigler [Fri, 17 Jul 2009 19:20:48 +0000 (15:20 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

* 'master' of ssh://sources.redhat.com/git/systemtap:
  Add chng_cpu.stp and migrate.stp examples.
  Add network/tcpipstat.stp descriptions.

15 years agoPR10410: dentry tapset, autofs4 sample
Jeff Moyer [Fri, 17 Jul 2009 19:19:26 +0000 (15:19 -0400)]
PR10410: dentry tapset, autofs4 sample

* tapset/dentry.stp: New d_path, d_name, reverse_path_walk.
* .../examples/.../autofs4.*: New autofs demo.

Signed-off-by: Frank Ch. Eigler <fche@elastic.org>
15 years agoAdd chng_cpu.stp and migrate.stp examples.
William Cohen [Fri, 17 Jul 2009 19:18:51 +0000 (15:18 -0400)]
Add chng_cpu.stp and migrate.stp examples.

15 years agoAdd network/tcpipstat.stp descriptions.
William Cohen [Fri, 17 Jul 2009 19:12:26 +0000 (15:12 -0400)]
Add network/tcpipstat.stp descriptions.

15 years agoPR3498 cont'd: better tolerate missing modules
Frank Ch. Eigler [Fri, 17 Jul 2009 13:37:35 +0000 (09:37 -0400)]
PR3498 cont'd: better tolerate missing modules

* tapsets.cxx (get_{user,kern}_dw): Skip partially allocated (0-initialized)
  FOO_dw[] slots that may result from dwflpp::ctor exceptions.

15 years agoThis SNMP group of tapsets provides probes used to count SNMP management
David J. Wilder [Thu, 16 Jul 2009 23:47:01 +0000 (16:47 -0700)]
This SNMP group of tapsets provides probes used to count SNMP management
events.  The probes mirror many of the SNMP statistics defined
in /usr/include/linux/snmp.h.  Each probe represents a single SNMP
statistic or MIB. Each of the probe's handler is called when system
performs an operation that would alter the associated statistic. Along
with each probe is defined an indexed set of counters used to record
probe hits. The probe handlers call a user supplied callback functions
to determine which counter to alter. The user's callback should returns a
key value that will be used to index the counter. For example a callback
could return a unique value for each socket. This would results in a
separate counter being used for each socket.

tcpipstat.stp shows how snmp tapsets could be used. Tcpipstat collects and
displays network statistics related to individual TCP sockets or groups of
sockets. The statistics that are collected are simmer to that of the command
netstat -s, only sorted and grouped by individual sockets.
Signed-off-by: David Wilder <dwilder@us.ibm.com>
15 years agoPR10398 DW_OP_call_frame CFA support doesn't work for prelink shared libs.
Mark Wielaard [Thu, 16 Jul 2009 21:32:12 +0000 (23:32 +0200)]
PR10398 DW_OP_call_frame CFA support doesn't work for prelink shared libs.

* dwflpp.cxx (translate_location): Call get_cfa_ops with relative pc plus
  module bias.
  (literal_addr_to_sym_addr): Add verbose logging.
  (get_cfa_ops): Adjust pc for returned bias. Add verbose logging.

15 years agoInclude elfutils/version.h in loc2c-test.
Mark Wielaard [Thu, 16 Jul 2009 17:31:52 +0000 (19:31 +0200)]
Include elfutils/version.h in loc2c-test.

* loc2c-test.c: Include elfutils/version.h when available.

15 years agoBUG! "yes" breaks ustack PR10323 was fixed a while ago, remove comment.
Mark Wielaard [Thu, 16 Jul 2009 14:11:10 +0000 (16:11 +0200)]
BUG! "yes" breaks ustack PR10323 was fixed a while ago, remove comment.

15 years agoPR5930: Address-op for $target and @cast members
Josh Stone [Thu, 16 Jul 2009 01:21:56 +0000 (18:21 -0700)]
PR5930: Address-op for $target and @cast members

This allows the '&' operator to get the address of @cast and $target
variable expressions.

* staptree.h (target_symbol): add addressof field
* staptree.cxx (target_symbol::print): print '&' for addressof
  (cast_op::print): ditto
* parse.cxx (parser::parse_value): allow '&' prefix on $target/@cast
* dwflpp.cxx (dwflpp::translate_final_fetch_or_store): allow taking the
  computed address without actually doing a final fetch.
* tapset* (*::visit_target_symbol): throw errors for $vars w/o addresses
* testsuite/systemtap.base/cast.stp: add &@cast test
* testsuite/semok/target_addr.stp: test '&' on different member types
* testsuite/semko/target_addr?.stp: test failure on bitfields/registers

15 years agoUpdate for RHEL 5.4
William Cohen [Wed, 15 Jul 2009 22:34:22 +0000 (18:34 -0400)]
Update for RHEL 5.4

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
William Cohen [Wed, 15 Jul 2009 22:34:16 +0000 (18:34 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoAdd desciption of tracepoint event.
William Cohen [Wed, 15 Jul 2009 22:31:35 +0000 (18:31 -0400)]
Add desciption of tracepoint event.

15 years agoAdd description of dropwatch to the examples.
William Cohen [Wed, 15 Jul 2009 22:12:24 +0000 (18:12 -0400)]
Add description of dropwatch to the examples.

15 years agoutrace_syscall_args.stp makes sure open syscall is from target pid.
David Smith [Wed, 15 Jul 2009 16:52:52 +0000 (11:52 -0500)]
utrace_syscall_args.stp makes sure open syscall is from target pid.
* testsuite/systemtap.base/utrace_syscall_args.stp: Makes sure the open
  syscall is from the target pid.

15 years agoImplemented ring_buffer iterators.
David Smith [Wed, 15 Jul 2009 16:16:51 +0000 (11:16 -0500)]
Implemented ring_buffer iterators.
* runtime/transport/ring_buffer.c (_stp_ring_buffer_empty_cpu): New function.
  (_stp_ring_buffer_empty): Ditto.
  (_stp_ring_buffer_iterator_increment): Ditto.
  (_stp_tracing_wait_pipe): Calls _stp_ring_buffer_empty() instead of
  ring_buffer_empty().
  (_stp_peek_next_event): Looks at iterators first.
  (_stp_find_next_event): Calls _stp_ring_buffer_empty_cpu() and
  increments iterator.
  (_stp_data_read_trace): Opens and closes ring_buffer iterators.
  (_stp_data_poll_trace): Calls _stp_ring_buffer_empty().
  (__stp_relay_wakeup_timer): Ditto.
* runtime/transport/control.c (_stp_ctl_write_cmd): Increased level
  required to get a debug print.

15 years agotestsuite rpm package should depend on systemtap-sdt-devel
Mark Wielaard [Wed, 15 Jul 2009 14:53:31 +0000 (16:53 +0200)]
testsuite rpm package should depend on systemtap-sdt-devel

* systemtap.spec (testsuite): Require systemtap-sdt-devel.

15 years agoPR10399 dtrace should obey prefix install path
Mark Wielaard [Wed, 15 Jul 2009 13:16:54 +0000 (15:16 +0200)]
PR10399 dtrace should obey prefix install path

* dtrace: Renamed to...
* dtrace.in: Add -I@prefix/include to gcc invocation.
* configure.ac (AC_CONFIG_FILES): List dtrace.
* configure: Regenerated.

15 years agoPR10388 Support DW_OP_call_frame_cfa.
Mark Wielaard [Wed, 15 Jul 2009 10:04:57 +0000 (12:04 +0200)]
PR10388 Support DW_OP_call_frame_cfa.

Depends on elfutils 0.142 cfi support.

* loc2c.h (c_translate_location): Take (optional) Dwarf_Op *cfa_ops.
* loc2c.c (translate): Recognize DW_OP_call_frame_cfa.
  (location_from_address): Take cfa_ops, examine fb_ops, if it is
  DW_OP_call_frame_cfa, pass cfa_ops to translate instead.
  (location_relative): Take cfa_ops, pass to location_from_address.
  (c_translate_location): Take cfa_ops, pass to location_from_address.
* loc2c-test.c (handle_variable): Take cfa_ops, pass to c_translate_location
  when needed.
  (main): Fetch cfa_ops, pass to handle_variable.
* dwflpp.h (struct dwflpp): Add new method get_cfa_ops.
* dwflpp.cxx: Include elfutils/version.h.
  (translate_location): Fetch cfa_ops when necessary.
  (get_cfa_ops): New method.

15 years agoPR4166: Allow array-like indexing on pointers
Josh Stone [Wed, 15 Jul 2009 00:57:16 +0000 (17:57 -0700)]
PR4166: Allow array-like indexing on pointers

* dwflpp.cxx (dwflpp::translate_components): let pointers get treated
  the same as arrays, and add a final DIE dereference for array access.
* loc2c.c (c_translate_array): tolerate pointer types
* testsuite/systemtap.base/pointer_array.*: new test

15 years agotapsets.cxx doesn't need loc2c.h. All done through dwflpp.cxx now.
Mark Wielaard [Tue, 14 Jul 2009 20:17:56 +0000 (22:17 +0200)]
tapsets.cxx doesn't need loc2c.h. All done through dwflpp.cxx now.

* tapsets.cxx: Remove loc2c.h include.

15 years agoRemove -O[0123s] gcc optimization flags for gcc pass 4 speedups again.
Mark Wielaard [Tue, 14 Jul 2009 09:47:46 +0000 (11:47 +0200)]
Remove -O[0123s] gcc optimization flags for gcc pass 4 speedups again.

We cannot guarantee that (un)optimized code compiles and/or generates
fully functional code, so don't tempt the user to try it out.

* session.h (struct systemtap_session): Remove gcc_flags string field.
* hash.cxx (find_script_hash): Don't add gcc_flags.
* main.cxx (usage): Remove -O[0123s] documentation.
(main): Don't use gcc_flags.
* buildrun.cxx (compile_pass): Don't add gcc_flags to EXTRA_CFLAGS.
* stap1.in: Remove -O[0123s] documentation.
* testsuite/systemtap.base/cache.exp: Remove tests for -O[0123s].

15 years agoMake kernel opt-level the default again.
Mark Wielaard [Mon, 13 Jul 2009 22:30:55 +0000 (00:30 +0200)]
Make kernel opt-level the default again.

* main.cxx (main): Default gcc_flags to kernel opt-level (empty).
* buildrun.cxx (compile_pass): Add -freorder-blocks back, document choices.
* stap.1.in: Document new default opt-level.
* testsuite/systemtap.base/cache.exp: Adjust for new caching results.

15 years agoPR10075: emit address in probe registration logic
wenji [Sat, 27 Jun 2009 13:10:18 +0000 (09:10 -0400)]
PR10075: emit address in probe registration logic

* tapsets.cxx(dwarf_derived_probe_group::emit_module_init,
  kprobe_derived_probe_group::emit_module_init): print address.

15 years agoAdd -O[0123s] gcc optimization flags for gcc pass 4 speedup.
Mark Wielaard [Sat, 11 Jul 2009 17:59:42 +0000 (19:59 +0200)]
Add -O[0123s] gcc optimization flags for gcc pass 4 speedup.

* session.h (struct systemtap_session): Add gcc_flags string field.
* main.cxx (usage): Document -O[0123s].
  (main): Default gcc_flags to -O0. Add O:: to getopt_long. Handle case
  'O' to set gcc_flags.
* buildrun.cxx (compile_pass): Add gcc_flags to EXTRA_CFLAGS.
* stap1.in: Add -O[0123s] documentation.
* testsuite/systemtap.base/cache.exp: Add tests for -O[0123s].

15 years agoPR3523 was fixed, enable -t cache test case.
Mark Wielaard [Sat, 11 Jul 2009 17:28:00 +0000 (19:28 +0200)]
PR3523 was fixed, enable -t cache test case.

* testsuite/systemtap.base/cache.exp: Enable -t tests.

15 years agoDon't accidentially use user space ntohs function.
Mark Wielaard [Sat, 11 Jul 2009 09:58:52 +0000 (11:58 +0200)]
Don't accidentially use user space ntohs function.

The definition of ntohs comes from user space include headers
netinet/in.h which could define it as function instead of macro.
So use builtin kernel be16_to_cpu instead.

* tapset/aux_syscalls.stp (_struct_sockaddr_u): Define and use _stp_ntohs
  as be16_to_cpu.

15 years agoFix source_loc ostream operator << representation.
Mark Wielaard [Fri, 10 Jul 2009 15:58:01 +0000 (17:58 +0200)]
Fix source_loc ostream operator << representation.

* parse.cxx (operator << (ostream&,const source_loc&)): Add loc.file->name.

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Fri, 10 Jul 2009 15:10:51 +0000 (11:10 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoRename systemtap_exit to cleanup.
Dave Brolley [Fri, 10 Jul 2009 15:09:36 +0000 (11:09 -0400)]
Rename systemtap_exit to cleanup.
Allow shutdown_server to test $server_pid in order to determine whether we started a server.

15 years agoAdd numa_faults.stp example.
William Cohen [Fri, 10 Jul 2009 14:34:13 +0000 (10:34 -0400)]
Add numa_faults.stp example.

15 years agoPR10381 sdt.h macros create relocatable addresses in non-writable section.
Mark Wielaard [Fri, 10 Jul 2009 11:53:00 +0000 (13:53 +0200)]
PR10381 sdt.h macros create relocatable addresses in non-writable section.

Allocated section needs to be writable when creating pic shared objects
because we store relocatable addresses in them.

* includes/sys/sdt.h (ALLOCSEC): New macro, depends on __PIC__.
  (STAP_PROBE_DATA_): Use new ALLOCSEC macro.

15 years agoRemove the filename copy from token->location
Josh Stone [Thu, 9 Jul 2009 19:46:57 +0000 (12:46 -0700)]
Remove the filename copy from token->location

The location already has a pointer to a stapfile with the filename, so
there's no need to keep an extra copy.

15 years agoOptimize string usage in the lexer
Josh Stone [Thu, 9 Jul 2009 19:43:00 +0000 (12:43 -0700)]
Optimize string usage in the lexer

This speeds up the parsing stage >2x, mostly by minimizing string
construction and comparison where char comparison will do.

15 years agoAdded timer data flushing and overwrite handling to the ring_buffer transport.
David Smith [Thu, 9 Jul 2009 20:16:57 +0000 (15:16 -0500)]
Added timer data flushing and overwrite handling to the ring_buffer transport.
* buildrun.cxx (compile_pass): Checks for ring_buffer api change.
* runtime/autoconf-ring_buffer-flags.c: New file.
* runtime/transport/ring_buffer.c (tracing_wait_pipe): No longer
  schedules, just returns.  The timer function will handle it later.
  (_stp_data_write_reserve): Handles ring_buffer api change.  Added
  overwrite processing.  If we're full, delete an event to make room.
  (_stp_data_write_commit): Handles ring_buffer api change.
  (__stp_relay_wakeup_timer): New function.
  (__stp_relay_timer_start): Ditto.
  (__stp_relay_timer_stop): Ditto.
  (_stp_transport_data_fs_start): Calls __stp_relay_timer_start().
  (_stp_transport_data_fs_stop): Calls __stp_relay_timer_stop().
  (_stp_transport_data_fs_overwrite): Sets overwrite flag.

15 years agoPR3498, cont'd
Frank Ch. Eigler [Thu, 9 Jul 2009 17:39:03 +0000 (13:39 -0400)]
PR3498, cont'd

* dwflpp.cxx (dwfl_report_offline_predicate): Reject NULL filenames.

15 years agoFix signal.send matching for 2.6.30+.
Roland McGrath [Thu, 9 Jul 2009 07:02:52 +0000 (00:02 -0700)]
Fix signal.send matching for 2.6.30+.

15 years agoClarify sdt.h license for public domain.
Stan Cox [Wed, 8 Jul 2009 21:05:27 +0000 (17:05 -0400)]
Clarify sdt.h license for public domain.

15 years agoDo not use GPL for sdt.h.
Stan Cox [Wed, 8 Jul 2009 20:30:15 +0000 (16:30 -0400)]
Do not use GPL for sdt.h.

15 years agoPR3498 cont'd, fix wildcard module("*") probes
Frank Ch. Eigler [Wed, 8 Jul 2009 17:04:10 +0000 (13:04 -0400)]
PR3498 cont'd, fix wildcard module("*") probes

* dwflpp.cxx (name_has_wildcard): Make static.
  (dwfl_report_offline_predicate): Check & adjust behavior.
* dwflpp.h: Corresponding changes.
* tapsets.cxx: Note that kern_dw[] keys may be wildcard strings.
* testsuite/buildok/fortysix.stp: New test.

15 years agoAdd support for constant struct member field offsets.
Mark Wielaard [Tue, 7 Jul 2009 12:35:10 +0000 (14:35 +0200)]
Add support for constant struct member field offsets.

* loc2c.h (c_translate_add_offset): New function prototype.
* loc2c.c (c_translate_add_offset): New function implementation.
* loc2c-test.c (handle_variable): Use c_translate_add_offset if appropriate.
* dwflpp.cxx (translate_location): Likewise.

15 years agoMore gcc 4.5 'jump skips variable initialization' fixlets.
Mark Wielaard [Wed, 8 Jul 2009 07:38:33 +0000 (09:38 +0200)]
More gcc 4.5 'jump skips variable initialization' fixlets.

* tapset/ioblock.stp (__bio_start_sect): Declare, then initialize variables
  that could (through kread) take an early jump.
* tapset/nfs_proc.stp (get_prot_from_client): Likewise.
* tapset/scsi.stp (scsi_timer_pending): Likewise.
* tapset/task.stp (task_cpu): Likewise.
  (task_open_file_handles): Likewise.

15 years agocanonicalize exelib.exp test case names by [file tail /full/path]
Frank Ch. Eigler [Wed, 8 Jul 2009 00:17:48 +0000 (20:17 -0400)]
canonicalize exelib.exp test case names by [file tail /full/path]

15 years agoPR3498: speed up pass-2 and pass-3 for kernel offline dwfl module searching
Frank Ch. Eigler [Tue, 7 Jul 2009 18:36:53 +0000 (14:36 -0400)]
PR3498: speed up pass-2 and pass-3 for kernel offline dwfl module searching

* dwflpp.cxx (dwflpp ctor): Parametrize for user/kernel modes.
  Update callers.
  (dwfl_report_offline_predicate): New function.  Filter and
  abort searches early if possible.
  (setup_kernel): Use new predicate.
* dwflpp.h: Corresponding changes.
* tapsets.cxx (dwfl_report_offline_predicate): Remove this shared
  implementation.
  (dwarf_builder): Turn kern_dw into module_name->dwflpp* map, just
  like user_dw.
  (get_kern_dw): Adapt.
  (dwarf_build_no_more): Adapt.
* tapsets.h: Remove old shared predicate.
* translate.cxx (dwfl_report_offline_predicate2): New function.
  Filter and abort searches early if possible.
  (emit_symbol_data): Use it.

15 years agoPR10348 Compilation failure with gcc 4.5 snapshot: switch jumps over vars.
Mark Wielaard [Tue, 7 Jul 2009 18:19:40 +0000 (20:19 +0200)]
PR10348 Compilation failure with gcc 4.5 snapshot: switch jumps over vars.

* loc2c-test.c (print_vars): Define attr_mem, typedie_mem and typedie before
  switch.
* loc2c.c (translate): Wrap case DW_OP_drop in block brackets.
  (location_relative): Initialize stack.

15 years agoBZ 490234 fix.
David Smith [Mon, 6 Jul 2009 14:16:28 +0000 (09:16 -0500)]
BZ 490234 fix.
* runtime/procfs.c (_stp_rmdir_proc_module): Now before removing either
  '/proc/systemtap/${MODULE}' or '/proc/systemtap', lock the transport
  directory.  Also make sure '/proc/systemtap' is empty before removal.

15 years agoFixed PR 10258.
David Smith [Thu, 2 Jul 2009 20:39:57 +0000 (15:39 -0500)]
Fixed PR 10258.
* tapset-procfs.cxx (procfs_derived_probe::join_group): Outputs structure
  definition.
  (procfs_derived_probe_group::emit_module_decls): The generated
  '_stp_procfs_read' and '_stp_procfs_write' functions no longer put a
  string_t on the stack.
  (procfs_var_expanding_visitor::visit_target_symbol): The generated
  '_procfs_value_set' and '_procfs_value_get' functions copy directly
  into or out of the os buffer.

15 years agoPR10327: resolve symbol aliases to dwarf functions
Josh Stone [Thu, 2 Jul 2009 01:59:41 +0000 (18:59 -0700)]
PR10327: resolve symbol aliases to dwarf functions

This will first read in the symbol table for modules, and update the
dwarf cu_function_cache with aliased names too.  Then when iterating
in dwarf, all of the possible names are matched, instead of only the
canonical dwarf name.

* dwflpp.cxx (dwflpp::iterate_over_functions): call update_symtab,
  and track wildcard addresses in a set to avoid alias dupes
* dwflpp.h (symbol_table::Compare): removed
* tapsets.cxx (symbol_table::map_by_addr): replaces list_by_addr
  (symbol_table::sort): removed -- multimap doesn't need sorting
  (symbol_table::mark_dwarf_redundancies): removed, see update_symtab
  (symbol_table::purge_syscall_stubs): remove map elements inline
  (dwarf_query::handle_query_module): preload the symtable.
  (query_dwarf_func): don't compare the function a second time,
  especially since it may have been an alias that matched at first.
  (module_info::get_symtab): allow being called multiple times
  (module_info::update_symtab): copy dies from the cache to the symtab,
  and also add aliased names to the cache

15 years agoAUTHORS update
Josh Stone [Wed, 1 Jul 2009 23:46:43 +0000 (16:46 -0700)]
AUTHORS update

15 years agoRemoved extra period in statement.(ADDRESS)
Josh Stone [Wed, 1 Jul 2009 23:46:05 +0000 (16:46 -0700)]
Removed extra period in statement.(ADDRESS)

15 years agoSystemTap Language Reference: DWARF-less probing patch
Robb Romans [Fri, 26 Jun 2009 19:25:56 +0000 (14:25 -0500)]
SystemTap Language Reference: DWARF-less probing patch

Here is a patch to the Language Reference Guide that adds information
about DWARF-less probing.

Signed-off-by: Robb Romans <robb@linux.vnet.ibm.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
15 years agoSpecial case _stp_kretprobe_trampoline emission for -1
Roland McGrath [Wed, 1 Jul 2009 02:03:30 +0000 (19:03 -0700)]
Special case _stp_kretprobe_trampoline emission for -1

* translate.cxx (emit_symbol_data_done): Special case
_stp_kretprobe_trampoline emission for -1, which is invalid
in hex if host width > target width.

15 years agoAdd shebang
Eugeniy Meshcheryakov [Tue, 30 Jun 2009 11:16:41 +0000 (13:16 +0200)]
Add shebang

15 years agoMake the file executable
Eugeniy Meshcheryakov [Tue, 30 Jun 2009 11:13:32 +0000 (13:13 +0200)]
Make the file executable

15 years agoUpdate memory and ioscheduler tapset for 2.6.31
Wenji Huang [Tue, 30 Jun 2009 01:42:19 +0000 (21:42 -0400)]
Update memory and ioscheduler tapset for 2.6.31

* tapset/ioscheduler.stp (elv_next_request): Change to blk_peek_request.
* tapset/memory.stp (vm.pagefault): Replace $write_access.

15 years agoAn i386 kprobe needs regparm(0) to access args.
Stan Cox [Fri, 26 Jun 2009 20:34:00 +0000 (16:34 -0400)]
An i386 kprobe needs regparm(0) to access args.

* tapsets.cxx (probe_table::convert_probe): Add regparm for kprobe.

15 years agoUse_utrace_syscall_arg with sdt utrace probes to avoid i386 arg fetching problems.
Stan Cox [Fri, 26 Jun 2009 18:28:46 +0000 (14:28 -0400)]
Use_utrace_syscall_arg with sdt utrace probes to avoid i386 arg fetching problems.

* tapsets.cxx (probe_table):  Add is_uprobe and is_utrace.
(probe_table::convert_probe): Use _utrace_syscall_arg.
(sdt_var_expanding_visitor): Add utrace_probe.
(sdt_var_expanding_visitor::visit_target_symbol): Use _utrace_syscall_arg.

15 years agoPR10335 systemtap.base/strftime.exp hangs.
Mark Wielaard [Fri, 26 Jun 2009 14:36:58 +0000 (16:36 +0200)]
PR10335 systemtap.base/strftime.exp hangs.

This only happened if there was a lot of cruft in the testsuite dir since
expect wasn't "draining" the output of the spawned ls command for some
reason. Work around it by just using tcl file globs to match.

* testsuite/systemtap.base/strftime.exp: Test with glob and file exists.

15 years agoPR10323 Some ustack exelib.exp tests fail with prelinked shared libs.
Mark Wielaard [Thu, 25 Jun 2009 21:07:17 +0000 (23:07 +0200)]
PR10323 Some ustack exelib.exp tests fail with prelinked shared libs.

For shared libraries (.dynamic sections) we need the eh frame section
address offset. This is the sh_addr if the shared library isn't prelinked
(since the base load address is zero in that case), otherwise it is
the module start address minus the bias (which also works for the
non-prelinked case).

* translate.cxx (get_unwind_data): Adjust eh_addr for module start and
  bias if module isn't absolute (has no relocations).
* testsuite/systemtap.exelib/ustack.tcl: Accept all prelink tests.

15 years agostap-* scripts should be executable.
Dave Brolley [Thu, 25 Jun 2009 17:06:26 +0000 (13:06 -0400)]
stap-* scripts should be executable.

15 years agoOnly compile with plain gcc for exelib.exp testcases.
Mark Wielaard [Thu, 25 Jun 2009 14:44:02 +0000 (16:44 +0200)]
Only compile with plain gcc for exelib.exp testcases.

g++ is also supported but disabled because it didn't add much interesting
differences in binaries and exploded the test search case a bit.
* testsuite/systemtap.exelib/exelib.exp: Disable g++ by default, but
  keep support for enabling it.

15 years agoAdd seperate debuginfo after prelinking to exelib.exp tests.
Mark Wielaard [Thu, 25 Jun 2009 14:35:53 +0000 (16:35 +0200)]
Add seperate debuginfo after prelinking to exelib.exp tests.

We split debuginfo before prelinking, that means that the base load address
of the .so is non-zero, while for the .debug files they are zero.  In the
other case we supported sep-debug without prelinking both .so and .debug
load bases were zero. In this new test case both base load addresses are
non-zero.

* testsuite/systemtap.exelib/exelib.exp: Add libdebug == "sep-after" to
  indicate separate debuginfo after prelinking library. Skip sep-after
  if not prelinking.

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
William Cohen [Wed, 24 Jun 2009 13:37:51 +0000 (09:37 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoHave appropriate argument for bkl.stp built and run tests.
William Cohen [Wed, 24 Jun 2009 13:33:57 +0000 (09:33 -0400)]
Have appropriate argument for bkl.stp built and run tests.

15 years agoEnable exelib.exp prelink tests except for ustack.tcl.
Mark Wielaard [Wed, 24 Jun 2009 12:26:08 +0000 (14:26 +0200)]
Enable exelib.exp prelink tests except for ustack.tcl.

* testsuite/systemtap.exelib/exelib.exp: Enable prelink "yes".
* testsuite/systemtap.exelib/ustack.tcl: Ignore any prelink test (PR10323).

15 years agoPR10305 Mark probes fail on prelinked shared library.
Mark Wielaard [Wed, 24 Jun 2009 12:20:08 +0000 (14:20 +0200)]
PR10305 Mark probes fail on prelinked shared library.

Mark probes rely on literal statement addresses, these are based on the
on-disk module address space. Introduce helper function to turn such
addresses into symbol addresses as expected by libdwfl. Also properly
adjust for dw bias when such addresses are used in dw queries.

* dwflpp.h (dwflpp::literal_addr_to_sym_addr): New method.
* dwflpp.cxx (query_cu_containing_address): Don't "globalize" address.
  (literal_addr_to_sym_addr): New method.
* tapsets.cxx (query_module_dwarf): Turn literal addresses into symbol
  addresses.
  (query_dwarf_func): Likewise and adjust for dw module bias.

15 years agoloc2c-test resolve through const and volatile types.
Mark Wielaard [Wed, 24 Jun 2009 09:38:40 +0000 (11:38 +0200)]
loc2c-test resolve through const and volatile types.

* loc2c-test.c (handle_variable): Resolve through DW_TAG_const_type and
  DW_TAG_volatile_type typetags.

15 years agoRemove needless string copying
Josh Stone [Wed, 24 Jun 2009 01:31:38 +0000 (18:31 -0700)]
Remove needless string copying

More fat-trimming optimization for ~7% off listing syscall.*.

* dwflpp.cxx (dwflpp::iterate_over_functions): remove a parameter copy
  (dwflpp::module_name_matches): Use const string& parameters
  (dwflpp::name_has_wildcard): Ditto.
  (dwflpp::module_name_final_match): Ditto.
  (dwflpp::function_name_matches_pattern): Ditto.
  (dwflpp::function_name_matches): Ditto.
  (dwflpp::function_name_final_match): Ditto.

15 years agomention that process.* probes are limited to -c/-x hierarchy if given
Frank Ch. Eigler [Tue, 23 Jun 2009 20:00:44 +0000 (16:00 -0400)]
mention that process.* probes are limited to -c/-x hierarchy if given

15 years agoMake blk.stp and blk_stats.stp executable.
William Cohen [Tue, 23 Jun 2009 19:52:51 +0000 (15:52 -0400)]
Make blk.stp and blk_stats.stp executable.

15 years agoAdd the bkl.stp and bkl_stats.stp examples.
William Cohen [Tue, 23 Jun 2009 19:51:48 +0000 (15:51 -0400)]
Add the bkl.stp and bkl_stats.stp examples.

15 years agoPR 10313 Build error due to deprecation of elf_getshstrndx in elfutils (old)
Mark Wielaard [Tue, 23 Jun 2009 08:32:10 +0000 (10:32 +0200)]
PR 10313 Build error due to deprecation of elf_getshstrndx in elfutils (old)

Really old versions of elfutils didn't have version.h, but we still want
to support them. So add workaround also for that case.

* dwflpp.h: Define elf_getshdrstrndx as elf_getshstrndx also for really
  old elfutils versions.

15 years agoPR 10313 Build error due to deprecation of elf_getshstrndx in elfutils.
Mark Wielaard [Tue, 23 Jun 2009 08:20:07 +0000 (10:20 +0200)]
PR 10313 Build error due to deprecation of elf_getshstrndx in elfutils.

* dwflpp.h: Check elfutils version, define elf_getshdrstrndx as
  elf_getshstrndx if elfutils 0.142 detected.
* dwflpp.cxx (get_blacklist_section): Use elf_getshdrstrndx.
* tapsets.cxx (probe_table): Likewise.
  (prepare_section_rejection): Likewise.

15 years agoRemove unused strlens from str_replace
Josh Stone [Mon, 22 Jun 2009 21:24:42 +0000 (14:24 -0700)]
Remove unused strlens from str_replace

15 years agoTestcase For str_replace()
Varun Chandramohan [Sat, 20 Jun 2009 04:10:36 +0000 (09:40 +0530)]
Testcase For str_replace()

This patch adds the test case needed for this function. I have added
few tests. If required more can be added in future.

As discussed in previous version, the testcase patch has been reverted
to the original as the str_replace() functionality has changed wrt to
error handle.

Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
This page took 0.06259 seconds and 5 git commands to generate.