summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix source_loc ostream operator << representation.Mark Wielaard2009-07-101-1/+1
| | | | * parse.cxx (operator << (ostream&,const source_loc&)): Add loc.file->name.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-07-1014-188/+338
|\
| * Add numa_faults.stp example.William Cohen2009-07-106-1/+99
| |
| * PR10381 sdt.h macros create relocatable addresses in non-writable section.Mark Wielaard2009-07-101-1/+9
| | | | | | | | | | | | | | | | 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.
| * Remove the filename copy from token->locationJosh Stone2009-07-094-37/+30
| | | | | | | | | | The location already has a pointer to a stapfile with the filename, so there's no need to keep an extra copy.
| * Optimize string usage in the lexerJosh Stone2009-07-092-113/+101
| | | | | | | | | | This speeds up the parsing stage >2x, mostly by minimizing string construction and comparison where char comparison will do.
| * Added timer data flushing and overwrite handling to the ring_buffer transport.David Smith2009-07-093-40/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Rename systemtap_exit to cleanup.Dave Brolley2009-07-101-5/+6
|/ | | | Allow shutdown_server to test $server_pid in order to determine whether we started a server.
* PR3498, cont'dFrank Ch. Eigler2009-07-091-0/+4
| | | | * dwflpp.cxx (dwfl_report_offline_predicate): Reject NULL filenames.
* Fix signal.send matching for 2.6.30+.Roland McGrath2009-07-091-26/+28
|
* Clarify sdt.h license for public domain.Stan Cox2009-07-081-1/+1
|
* Do not use GPL for sdt.h.Stan Cox2009-07-081-5/+1
|
* PR3498 cont'd, fix wildcard module("*") probesFrank Ch. Eigler2009-07-084-24/+27
| | | | | | | | * 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.
* Add support for constant struct member field offsets.Mark Wielaard2009-07-084-5/+86
| | | | | | | * 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.
* More gcc 4.5 'jump skips variable initialization' fixlets.Mark Wielaard2009-07-084-20/+41
| | | | | | | | | * 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.
* canonicalize exelib.exp test case names by [file tail /full/path]Frank Ch. Eigler2009-07-071-4/+4
|
* PR3498: speed up pass-2 and pass-3 for kernel offline dwfl module searchingFrank Ch. Eigler2009-07-075-56/+121
| | | | | | | | | | | | | | | | | | | * 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.
* PR10348 Compilation failure with gcc 4.5 snapshot: switch jumps over vars.Mark Wielaard2009-07-072-7/+10
| | | | | | | * 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.
* BZ 490234 fix.David Smith2009-07-061-8/+7
| | | | | | * 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.
* Fixed PR 10258.David Smith2009-07-021-26/+45
| | | | | | | | | | | * 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.
* PR10327: resolve symbol aliases to dwarf functionsJosh Stone2009-07-013-108/+89
| | | | | | | | | | | | | | | | | | | | | 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
* AUTHORS updateJosh Stone2009-07-011-0/+2
|
* Removed extra period in statement.(ADDRESS)Josh Stone2009-07-011-1/+1
|
* SystemTap Language Reference: DWARF-less probing patchRobb Romans2009-07-011-1/+59
| | | | | | | | 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>
* Special case _stp_kretprobe_trampoline emission for -1Roland McGrath2009-06-301-7/+12
| | | | | | * translate.cxx (emit_symbol_data_done): Special case _stp_kretprobe_trampoline emission for -1, which is invalid in hex if host width > target width.
* Add shebangEugeniy Meshcheryakov2009-06-301-0/+1
|
* Make the file executableEugeniy Meshcheryakov2009-06-301-0/+0
|
* Update memory and ioscheduler tapset for 2.6.31Wenji Huang2009-06-292-2/+15
| | | | | * tapset/ioscheduler.stp (elv_next_request): Change to blk_peek_request. * tapset/memory.stp (vm.pagefault): Replace $write_access.
* An i386 kprobe needs regparm(0) to access args.Stan Cox2009-06-261-0/+17
| | | | * tapsets.cxx (probe_table::convert_probe): Add regparm for kprobe.
* Use_utrace_syscall_arg with sdt utrace probes to avoid i386 arg fetching ↵Stan Cox2009-06-261-13/+18
| | | | | | | | | 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.
* PR10335 systemtap.base/strftime.exp hangs.Mark Wielaard2009-06-261-20/+3
| | | | | | | | 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.
* PR10323 Some ustack exelib.exp tests fail with prelinked shared libs.Mark Wielaard2009-06-252-6/+8
| | | | | | | | | | | | 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.
* stap-* scripts should be executable.Dave Brolley2009-06-254-0/+0
|
* Only compile with plain gcc for exelib.exp testcases.Mark Wielaard2009-06-251-1/+4
| | | | | | | 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.
* Add seperate debuginfo after prelinking to exelib.exp tests.Mark Wielaard2009-06-251-2/+16
| | | | | | | | | | | | 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.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapWilliam Cohen2009-06-246-29/+75
|\
| * Enable exelib.exp prelink tests except for ustack.tcl.Mark Wielaard2009-06-242-2/+5
| | | | | | | | | | * testsuite/systemtap.exelib/exelib.exp: Enable prelink "yes". * testsuite/systemtap.exelib/ustack.tcl: Ignore any prelink test (PR10323).
| * PR10305 Mark probes fail on prelinked shared library.Mark Wielaard2009-06-243-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * loc2c-test resolve through const and volatile types.Mark Wielaard2009-06-241-1/+3
| | | | | | | | | | * loc2c-test.c (handle_variable): Resolve through DW_TAG_const_type and DW_TAG_volatile_type typetags.
| * Remove needless string copyingJosh Stone2009-06-232-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Have appropriate argument for bkl.stp built and run tests.William Cohen2009-06-241-2/+2
|/
* mention that process.* probes are limited to -c/-x hierarchy if givenFrank Ch. Eigler2009-06-231-1/+4
|
* Make blk.stp and blk_stats.stp executable.William Cohen2009-06-232-0/+0
|
* Add the bkl.stp and bkl_stats.stp examples.William Cohen2009-06-238-0/+228
|
* PR 10313 Build error due to deprecation of elf_getshstrndx in elfutils (old)Mark Wielaard2009-06-231-0/+3
| | | | | | | | 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.
* PR 10313 Build error due to deprecation of elf_getshstrndx in elfutils.Mark Wielaard2009-06-233-4/+11
| | | | | | | | * 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.
* Remove unused strlens from str_replaceJosh Stone2009-06-221-2/+0
|
* Testcase For str_replace()Varun Chandramohan2009-06-222-0/+39
| | | | | | | | | | | | 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>
* Add str_replace() To TapsetsVarun Chandramohan2009-06-221-0/+33
| | | | | | | | | | | | | | | | | | This patch adds a search and replace string functionality to existing tapsets. The functionality is as follows: The function takes in a parent string and searches for a substring as specified by the user. If substring not found, the parent string is returned. If substring is found, it is replaced by another string and returned. NOTE: The function will search and replace all the occurrence of substrings in a parent string when matched. Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com> Signed-off-by: Josh Stone <jistone@redhat.com>
* Merge commit 'origin'Josh Stone2009-06-222-1/+3
|\