]> sourceware.org Git - systemtap.git/log
systemtap.git
15 years agoRename and package the grapher
Josh Stone [Tue, 4 Aug 2009 22:11:44 +0000 (15:11 -0700)]
Rename and package the grapher

* grapher/Makefile.am: Rename the binary to stapgraph.
* grapher/Makefile.in: Regen.
* systemtap.spec: Add a -grapher subpackage.

15 years agoAdd NEWS on stapgraph
Tim Moore [Tue, 4 Aug 2009 21:57:10 +0000 (23:57 +0200)]
Add NEWS on stapgraph

15 years agoAdd NEWS on DW_OP_call_frame_CFA, uprobes/ustack, .probes and statement().
Mark Wielaard [Tue, 4 Aug 2009 20:52:43 +0000 (22:52 +0200)]
Add NEWS on DW_OP_call_frame_CFA, uprobes/ustack, .probes and statement().

15 years agoAdd #include and casting to allow compilations of grapher on RHEL5.
William Cohen [Tue, 4 Aug 2009 18:00:07 +0000 (14:00 -0400)]
Add #include and casting to allow compilations of grapher on RHEL5.

15 years agoAdd update_visitor::replace
Josh Stone [Mon, 3 Aug 2009 22:49:40 +0000 (15:49 -0700)]
Add update_visitor::replace

I noticed that most uses of update_visitor::require() were simply
writing the value back to the same place, i.e. foo = require(foo).  The
new replace() method just encapsulates that paradigm, so we don't have
the duplication between the LHS and RHS.

* staptree.h (update_visitor::replace): New.
* elaborate.cxx, staptree.cxx, tapset-mark.cxx, tapset-perfmon.cxx,
  tapset-procfs.cxx, tapset-utrace.cxx, tapsets.cxx: Update all require
  calls that are simply updating the value in-place.

15 years agoStrengthen the template types in update_visitor
Josh Stone [Mon, 3 Aug 2009 22:20:19 +0000 (15:20 -0700)]
Strengthen the template types in update_visitor

* staptree.h (update_visitor::require, provide): Make the parameters and
  return values a T*, to make it explicit that we want pointer types.

15 years agoMerge branch 'array_index'
Josh Stone [Mon, 3 Aug 2009 22:16:09 +0000 (15:16 -0700)]
Merge branch 'array_index'

15 years agoPR2049: support arbitrary $target-array indexing
Josh Stone [Mon, 3 Aug 2009 21:45:21 +0000 (14:45 -0700)]
PR2049: support arbitrary $target-array indexing

Rather than just numeric literals, we can now support arbitrary
expressions for the index value.  Note that loc2c won't allow this for
noncontiguous arrays, as the access methods need to be statically
computed, but for contiguous arrays and pointers-as-arrays it works
just fine.

* staptree.h (target_symbol::component): Add expression_array_index.
* staptree.cxx (target_symbol::visit_components): New helper.
  (target_symbol::assert_no_components): Recognize new array type.
  (target_symbol::component::print): Print subexpressions.
  (traversing_visitor::visit_target_symbol, visit_cast_op): Visit the
  indexing components too.
  (varuse_collecting_visitor::visit_target_symbol): Ditto.
  (update_visitor::visit_target_symbol, visit_cast_op): Ditto.
* elaborate.cxx (void_statement_reducer::visit_target_symbol): New.
  (void_statement_reducer::visit_cast_op): Save indexes too.
* parse.cxx (parser::parse_target_symbol_components): Parse expressions.
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Pass
  expression-indexes as parameters (indexN) to the dwarf function.
  (dwarf_cast_expanding_visitor::visit_cast_op): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.
  (sdt_var_expanding_visitor::visit_target_symbol): Visit the new @cast.
* dwflpp.cxx (dwflpp::translate_components): Use THIS->indexN.
* translate.cxx (c_unparser::visit_target_symbol): Correct error msg.
* testsuite/systemtap.base/pointer_array.stp: Use a simple index.

15 years agoPR10475: ensure that loc2c can find its array size
Josh Stone [Mon, 3 Aug 2009 21:20:46 +0000 (14:20 -0700)]
PR10475: ensure that loc2c can find its array size

* loc2c.c (array_stride): iterate DIEs past typedef/const/volatile

15 years agoMake sure we pick up our own sdt.h, not the (maybe not installed) system one.
Mark Wielaard [Mon, 3 Aug 2009 15:02:03 +0000 (17:02 +0200)]
Make sure we pick up our own sdt.h, not the (maybe not installed) system one.

* Makefile.am (AM_CPPFLAGS): Add -I$(srcdir)/includes.
* Makefile.in: Regenerated.

15 years agoUnify no-component assertions on target variables
Josh Stone [Sat, 1 Aug 2009 00:24:13 +0000 (17:24 -0700)]
Unify no-component assertions on target variables

There are several tapsets that can't deal with component dereferences on
their target variables, and they all check-and-throw in the same way.
This refactors the checks into a target_symbol member.

* staptree.cxx (target_symbol::assert_no_components): New.
* tapsets.cxx (tracepoint_var_expanding_visitor::visit_target_symbol_arg,
  tracepoint_var_expanding_visitor::visit_target_symbol_context): Use
  the new assertion function to check for no components.
* tapset-mark.cxx (mark_var_expanding_visitor::visit_target_symbol_arg,
  mark_var_expanding_visitor::visit_target_symbol_context): Ditto.
* tapset-perfmon.cxx (perfmon_var_expanding_visitor::visit_target_symbol): Ditto.
* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol): Ditto.
* tapset-utrace.cxx (utrace_var_expanding_visitor::visit_target_symbol_arg,
  utrace_var_expanding_visitor::visit_target_symbol_context): Ditto.

15 years agoMake a real type for target_symbol->components
Josh Stone [Sat, 1 Aug 2009 00:00:09 +0000 (17:00 -0700)]
Make a real type for target_symbol->components

Now the dereferences on target_symbol and cast_op are tracked with a
struct instead of just a generic pair.  The first immediate benefit is
that we can track the token for more exact error reporting.

* staptree.h (target_symbol): Add a new component type.
* staptree.cxx (target_symbol::component::print): New.
  (operator<<(ostream&, target_symbol::component&): New.
  (target_symbol::print): Adapt component printing.
  (cast_op::print): Ditto.
* parse.cxx (parser::parse_target_symbol_components): Adapt to the new
  component construction.
* dwflpp.cxx (dwflpp::find_struct_member): take the component as a
  parameter for a better token in error messages
  (dwflpp::translate_components): Adapt to the new component type.
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Don't
  overwrite the token in target_symbol saved errors.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.

15 years agoRefactor parser for target_symbol->components
Josh Stone [Fri, 31 Jul 2009 20:46:54 +0000 (13:46 -0700)]
Refactor parser for target_symbol->components

The components were being parsed for both target_symbols and cast_ops,
so this change refactors that code into a single function.

* parse.cxx (parser::parse_target_symbol_components): New.
  (parser::parse_symbol): Use the new function.

15 years agoDrop a couple of unnecessary std:: qualifiers
Josh Stone [Fri, 31 Jul 2009 20:29:18 +0000 (13:29 -0700)]
Drop a couple of unnecessary std:: qualifiers

* staptree.cxx (target_symbol::print): Drop std:: from parameter o.
  (cast_op::print): Ditto.

15 years agoNEWS: note faster pass-2
Frank Ch. Eigler [Fri, 31 Jul 2009 21:51:22 +0000 (17:51 -0400)]
NEWS: note faster pass-2

15 years agoPR10204: Place userspace markers in systemtap itself
Kent Sebastian [Fri, 31 Jul 2009 20:35:20 +0000 (16:35 -0400)]
PR10204: Place userspace markers in systemtap itself

* tapset/stap_staticmarkers.stp: new file (for real this time)

15 years agoMerge branch 'master' of git+ssh://sources.redhat.com/git/systemtap
Kent Sebastian [Fri, 31 Jul 2009 20:34:25 +0000 (16:34 -0400)]
Merge branch 'master' of git+ssh://sources.redhat.com/git/systemtap

15 years agoPR10204: Place userspace markers in systemtap itself
Kent Sebastian [Fri, 31 Jul 2009 18:45:10 +0000 (14:45 -0400)]
PR10204: Place userspace markers in systemtap itself

* cache.cxx (add_to_cache,clean_cache): add static markers
* main.cxx (main): likewise
* runtime/staprun/common.c (send_request): likewise
* runtime/staprun/mainloop.c (stp_main_loop): likewise
* runtime/staprun/staprun.c (remove_module): likewise
* runtime/staprun/staprun.h: include sdt.h
* runtime/staprun/staprun_funcs.c (insert_module): likewise
* util.cxx (stap_system): likewise
* tapset/stap_staticmarkers.stp: new file

15 years agoAdd testcase for PR10458, PR10459 and PR10454.
Mark Wielaard [Fri, 31 Jul 2009 17:54:53 +0000 (19:54 +0200)]
Add testcase for PR10458, PR10459 and PR10454.

Last test currently disabled because PR10454 is still open.

* testsuite/systemtap.context/uprobe_stmt_num.exp: New file.
* testsuite/systemtap.context/uprobe_stmt_num.stp: Likewise.
* testsuite/systemtap.context/uprobe_stmt_num.c: Likewise.

15 years agoPR10458. User actual breakpoint address for [ku]probe[ret].
Mark Wielaard [Fri, 31 Jul 2009 16:46:47 +0000 (18:46 +0200)]
PR10458. User actual breakpoint address for [ku]probe[ret].

Setup the pt_regs REG_IP to the actual breakpoint address before
entering a probe handler for [ku]probe[ret] (and restore it after
returning). This helps getting symbol resolution and backtraces
more correct and makes it more conform with other probe handlers
like the iutrace and profile timers that also provide pt_regs
(which untill now exhibited off-by-one errors while unwinding).

* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls):
  Setup REG_IP correctly before calling enter_kprobe_probe
  and enter_kretprobe_probe, and restore afterwards.
  (uprobe_derived_probe_group::emit_module_decls): Likewise for
  enter_uprobe_probe and enter_uretprobe_probe.
  (kprobe_derived_probe_group::emit_module_decls): Likewise for
  enter_kprobe2_probe and enter_kretprobe2_probe.
* runtime/unwind/i386.h (arch_unw_init_frame_info): Initialize
  info->call_frame to zero.
* runtime/unwind/x86_64.h (arch_unw_init_frame_info): Likewise.

15 years agoRelax the type-matching in the cmd_parse13 test
Josh Stone [Fri, 31 Jul 2009 02:24:17 +0000 (19:24 -0700)]
Relax the type-matching in the cmd_parse13 test

Dwarf probes are now printing their $target variables in -L, so we need
to handle more than just stap types in the regular expression.

15 years agodtrace.in: Don't interpret -h -o FILE, just use the filename as is.
Stan Cox [Thu, 30 Jul 2009 21:04:09 +0000 (17:04 -0400)]
dtrace.in: Don't interpret -h -o FILE, just use the filename as is.

15 years agoPR10459. Disable all warning messages on -w.
Mark Wielaard [Wed, 29 Jul 2009 22:06:59 +0000 (00:06 +0200)]
PR10459. Disable all warning messages on -w.

* stap.1.in: Document that -w disables all warning messages.
* dwflpp.cxx (get_module_dwarf): Only output warning when session
  suppress_warnings is not set.
* translate.cxx (dump_unwindsyms): Likewise.
  (emit_symbol_data_done): Likewise.
* tapsets.cxx (query_module_symtab): Likewise.
  (read_from_elf_file): Take systemtap_session, check suppress_warnings
  before emitting warning.
  (read_from_text_file): Likewise.
  (get_symtab): Call read_from_elf_file and read_from_text_file with session.

15 years agoRemove unused result_string from ustack.tcl.
Mark Wielaard [Wed, 29 Jul 2009 21:26:26 +0000 (23:26 +0200)]
Remove unused result_string from ustack.tcl.

* testsuite/systemtap.exelib/ustack.tcl: Remove result_string.

15 years agoEnable variable listing (-L) for uprobes
Josh Stone [Wed, 29 Jul 2009 21:34:32 +0000 (14:34 -0700)]
Enable variable listing (-L) for uprobes

All $target variables and their C-types are now printed in -L mode.

* tapsets.cxx (uprobe_derived_probe::uprobe_derived_probe): Save the local
  arguments while we still have the dwflpp open.
  (uprobe_derived_probe::saveargs): New
  (uprobe_derived_probe::printargs): New

15 years agoEnable variable listing (-L) for dwarf probes
Josh Stone [Wed, 29 Jul 2009 21:07:37 +0000 (14:07 -0700)]
Enable variable listing (-L) for dwarf probes

All $target variables and their C-types are now printed in -L mode.

* tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Save the local
  arguments while we still have the dwflpp open.
  (dwarf_derived_probe::saveargs): New
  (dwarf_derived_probe::printargs): New

15 years agoUse a real session flag for -L
Josh Stone [Wed, 29 Jul 2009 19:35:29 +0000 (12:35 -0700)]
Use a real session flag for -L

Rather than relying on 'unoptimized' to tell us that the listing mode
should print the variables too, this adds an explicit listing_mode_vars.

* session.h (systemtap_session): Add listing_mode_vars
* main.cxx (main): Set s.listing_mode_vars appropriately.
  (printscript): Use the new flag for deciding whether to print locals

15 years agoBreak up dwarf_var_expanding_visitor::visit_target_symbol
Josh Stone [Wed, 29 Jul 2009 19:13:40 +0000 (12:13 -0700)]
Break up dwarf_var_expanding_visitor::visit_target_symbol

This just refactors large chunks of visit_target_symbol into a couple of
smaller functions.

* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_context): New
  (dwarf_var_expanding_visitor::visit_target_symbol_saved_return): New
  (dwarf_var_expanding_visitor::visit_target_symbol): Call the new ones

15 years agoPR6978: support $$parms for process.syscall
Wenji Huang [Tue, 28 Jul 2009 23:50:24 +0000 (19:50 -0400)]
PR6978: support $$parms for process.syscall

* tapset-utrace.cxx (visit_target_symbol_arg): Handle $$parms.
* testsuite/systemtap.base/utrace_p4.exp: Add test case.
* testsuite/systemtap.base/utrace_p5.exp: Ditto.

15 years agoPR10453: Fix crash.exp not to refer removed file
Masami Hiramatsu [Tue, 28 Jul 2009 21:26:55 +0000 (17:26 -0400)]
PR10453: Fix crash.exp not to refer removed file

* systemtap.base/crash.exp: Use command-line script instead of removed
  script file.

15 years agoImproves functionality on rawhide (2.6.31-rcX) kernels.
David Smith [Tue, 28 Jul 2009 19:40:41 +0000 (14:40 -0500)]
Improves functionality on rawhide (2.6.31-rcX) kernels.
* runtime/transport/ring_buffer.c (struct _stp_iterator): Renamed from
  _stp_ring_buffer_data.
  (_stp_data_open_trace): Uses _stp_iterator.
  (_stp_data_release_trace): Ditto.
  (_stp_ring_buffer_empty_cpu): Ditto.
  (_stp_ring_buffer_empty): Ditto.
  (_stp_ring_buffer_consume): Ditto.
  (_stp_tracing_wait_pipe): Ditto.
  (_stp_peek_next_event): Ditto.
  (_stp_find_next_event): Ditto.
  (_stp_data_read_trace): Ditto.
  (_stp_data_write_reserve): Ditto.

15 years agoInstall yum-utils when yumdownloader is missing first in stapprep.sh.
Mark Wielaard [Tue, 28 Jul 2009 09:57:27 +0000 (11:57 +0200)]
Install yum-utils when yumdownloader is missing first in stapprep.sh.

* doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh: Check whether
  yumdownloader is already available and install yum-utils if not.

15 years agoSupport for presenting multiple graphs
Tim Moore [Mon, 27 Jul 2009 10:46:30 +0000 (12:46 +0200)]
Support for presenting multiple graphs

* grapher/Graph.hxx: New file; class for single graph display.
* grapher/Graph.cxx: New file.
* grapher/GraphData.hxx: Associate title and axis labels with graph
data and not a graph display.
* grapher/GraphWidget.hxx: Move graph-related members to Graph class.
* grapher/GraphWidget.cxx (getExtents, setExtents): Move to Graph
class
(on_expose_event): Move graph rendering to Graph.
(on_button_press_event): Delegate to Graph.
(on_motion_notify_event, on_scroll_event): Modify "active" graph.
* grapher/StapParser.cxx (findTaggedValue): New parsing helper
function.
(io_callback): Support new syntax where properties are attached to
graph data and not the entire graph.
* grapher/grapher.cxx (GrapherWindow): Don't set graph values.
* grapher/Makefile.am: Add Graph.cxx.
* testsuite/systemtap.examples/general/grapher.stp: New property syntax.

15 years agographer fixups
Tim Moore [Thu, 4 Jun 2009 13:49:16 +0000 (15:49 +0200)]
grapher fixups

* grapher/grapher.cxx (main): Fix problems with call to execlp.

15 years agoTemplatize GraphData
Tim Moore [Wed, 27 May 2009 08:32:51 +0000 (10:32 +0200)]
Templatize GraphData

* grapher/GraphData.hxx (GraphDataBase): new superclass for
GraphData. Split time data out as a separate vector.
(GraphData): Rewrite as template.
* grapher/GraphWidget.cxx (on_expose_event): Reflect GraphData
templatization. Handle events with string values.
* grapher/GraphWidget.hxx (GraphWidget): Keep pointers to
GraphDataBase objects instead of GraphData.
* grapher/StapParser.cxx (parseData): new member function
(ioCallback): Handle new discreet event
* grapher/StapParser.hxx (StapParser): keep pointers to GraphDataBase
objects instead of GraphData
* testsuite/systemtap.examples/general/grapher.stp: Display actual key
pressed for keyboard event

15 years agorun stap from grapher
Tim Moore [Mon, 25 May 2009 16:25:47 +0000 (18:25 +0200)]
run stap from grapher

* grapher/grapher.cxx (main): Start stap + script from program if supplied
as an argument.

15 years agoIncorporate grapher widget in real application
Tim Moore [Mon, 25 May 2009 16:12:41 +0000 (18:12 +0200)]
Incorporate grapher widget in real application

* grapher/grapher.cxx (GrapherWindow): New class.
(main): Instantiate GrapherWindow.

15 years agoAdd CSV syntax support to the grapher
Tim Moore [Wed, 20 May 2009 11:29:54 +0000 (13:29 +0200)]
Add CSV syntax support to the grapher

* grapher/GraphData.hxx (CSVData): new class
* grapher/GraphData.cxx (commaSplit): new function
(ioCallback): handle CSV definition and data

15 years agoRefactor StapParser into its own files
Tim Moore [Wed, 29 Apr 2009 17:52:50 +0000 (19:52 +0200)]
Refactor StapParser into its own files

* grapher/StapParser.cxx: new file
* grapher/StapParser.hxx: new file
* grapher/grapher.cxx: Use external StapParser class.

15 years agoTweaks to grapher axis drawing
Tim Moore [Wed, 22 Apr 2009 08:20:20 +0000 (10:20 +0200)]
Tweaks to grapher axis drawing

* grapher/GraphWidget.cxx (on_expose_event): Don't draw axis labels
that would overlap others.

15 years agorestore newlines to grapher script header
Tim Moore [Wed, 22 Apr 2009 07:12:27 +0000 (09:12 +0200)]
restore newlines to grapher script header

* testsuite/systemtap.examples/general/grapher.stp: Restore newlines.

15 years agoPR6905: tweak WILDCARD and RANGE line type for process.statement
Wenji Huang [Mon, 27 Jul 2009 19:52:28 +0000 (15:52 -0400)]
PR6905: tweak WILDCARD and RANGE line type for process.statement

* dwflpp.cxx (iterate_over_srcfile_lines): Check the line range
  and tolerate invalid line number for WILDCARD line type.
* testsuite/systemtap.base/bz6905.c: Test case.
* testsuite/systemtap.base/bz6905.exp: Ditto.
* testsuite/systemtap.base/bz6905.stp: Ditto.

15 years agoMention where we looked and if we didn't find line info on statement probe.
Mark Wielaard [Mon, 27 Jul 2009 19:48:53 +0000 (21:48 +0200)]
Mention where we looked and if we didn't find line info on statement probe.

* tapsets.cxx (query_cu): When statement check fails and no line info
  available, mention the CU had no line info.

15 years agoExplicitly link with nss3 nspr4 and plc4 when used.
Mark Wielaard [Sat, 25 Jul 2009 09:42:54 +0000 (11:42 +0200)]
Explicitly link with nss3 nspr4 and plc4 when used.

GNU gold depends on all libraries providing symbols being explicitly
linked in (PR 10238). And it is pedantically more correct indeed.

* Makefile.am (stap_LD_ADD): Add -lnspr4 when HAVE_NSS.
  (staprun_LDADD): Likewise.
  (stap_client_connect_LDADD): Add -lnss3 -lnspr4 -lplc4 when BUILD_SERVER.
  (stap_server_connect_LDADD): Likewise.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.

15 years agoPR6898: support $$vars and $$parms for marker
Wenji Huang [Thu, 23 Jul 2009 23:04:13 +0000 (19:04 -0400)]
PR6898: support $$vars and $$parms for marker

* tapset-mark.cxx (visit_target_symbol_context): Add $$vars/$$parms.
* testsuite/systemtap.base/marker.exp : Test case.

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.

This page took 0.063636 seconds and 5 git commands to generate.