| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
The location already has a pointer to a stapfile with the filename, so
there's no need to keep an extra copy.
|
| |
| |
| |
| |
| | |
This speeds up the parsing stage >2x, mostly by minimizing string
construction and comparison where char comparison will do.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|/
|
|
| |
Allow shutdown_server to test $server_pid in order to determine whether we started a server.
|
|
|
|
| |
* dwflpp.cxx (dwfl_report_offline_predicate): Reject NULL filenames.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
* translate.cxx (emit_symbol_data_done): Special case
_stp_kretprobe_trampoline emission for -1, which is invalid
in hex if host width > target width.
|
| |
|
| |
|
|
|
|
|
| |
* tapset/ioscheduler.stp (elv_next_request): Change to blk_peek_request.
* tapset/memory.stp (vm.pagefault): Replace $write_access.
|
|
|
|
| |
* tapsets.cxx (probe_table::convert_probe): Add regparm for kprobe.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| |
| | |
* testsuite/systemtap.exelib/exelib.exp: Enable prelink "yes".
* testsuite/systemtap.exelib/ustack.tcl: Ignore any prelink test (PR10323).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.c (handle_variable): Resolve through DW_TAG_const_type and
DW_TAG_volatile_type typetags.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|\ |
|
| | |
|