kevinrs [Fri, 23 Dec 2005 21:09:32 +0000 (21:09 +0000)]
2005-12-23 Kevin Stafford <krstaffo@us.ibm.com>
SCRIPTS:
run.sh - This is the driver for automated testing.
To run: ./run.sh stpdirectory c_binaries_directory
Result: log/timestamp.log discerpancy report
ctostp.sh - This script generates corresponding stp probe script
files for every C file found in the input directory.
To Run: ctostp.sh input output where input is the
directory containing the C files to convert. Output
is the directory to store the corresponding stp
files.
build.sh - This script expedites the process of compiling all
of the c files. When the "compile" flag is given
it creates a directory called bin, which stores the
compiled C programs. ./build.sh clean removes the
binaries, and ./build.sh run attempts to execute all
of the programs in cfiles/bin.
kevinrs [Fri, 23 Dec 2005 20:38:22 +0000 (20:38 +0000)]
2005-12-23 Kevin Stafford <krstaffo@us.ibm.com>
* tapset/2.6.9-20.ELsmp/syscalls.stp: added kernel
version tapset
* tapset/2.6.9-20.ELsmp/i686/syscalls.stp: added kernel
version arch specific tapset
* tapset/doc/dicrepancies.txt: log of kernel version
discrepancies.
kevinrs [Fri, 23 Dec 2005 20:37:59 +0000 (20:37 +0000)]
2005-12-23 Kevin Stafford <krstaffo@us.ibm.com>
* tapset/2.6.9-20.ELsmp/syscalls.stp: added kernel
version tapset
* tapset/2.6.9-20.ELsmp/i686/syscalls.stp: added kernel
version arch specific tapset
* tapset/doc/dicrepancies.txt: log of kernel version
discrepancies.
askeshav [Fri, 16 Dec 2005 00:27:52 +0000 (00:27 +0000)]
Anil S Keshavamurthy - Blacklist'ing notifier_call_chain() function, as this
function is on kprobes critical path, having probes on this will damage the
system.
hunt [Wed, 14 Dec 2005 21:10:14 +0000 (21:10 +0000)]
2005-12-14 Martin Hunt <hunt@redhat.com>
* tapset/system_calls.stp (epoll.ctl): Temporarily remove
references to $op and $event because gcc 4.0.2 can't
find them.
(epoll.wait): Ditto for $maxevents.
hunt [Wed, 14 Dec 2005 21:06:57 +0000 (21:06 +0000)]
2005-12-14 Martin Hunt <hunt@redhat.com>
* pmap-gen.c (_stp_pmap_new_*): Initialize lock.
(_stp_pmap_set_*): Lock map while in use.
(_stp_pmap_add_*): Lock map while in use.
(_stp_pmap_get_cpu): Ditto.
(_stp_pmap_get): Lock each per-cpu map.
* map-gen.c: Define and use NULLRET for a NULL return value.
* map.c (_stp_pmap_clear): New function.
(_stp_pmap_agg): Lock each per-cpu map as
it gets aggregated.
jistone [Mon, 12 Dec 2005 23:42:21 +0000 (23:42 +0000)]
2005-12-12 Josh Stone <joshua.i.stone@intel.com>
* tapsets.cxx (profile_derived_probe::*,profile_builder::build): Do kernel
version checks at translation time, using the same internal mechanisms as
the preprocessor - a la %( kernel_v < "2.6.10" %? ... %: ... %)
jistone [Mon, 12 Dec 2005 22:19:12 +0000 (22:19 +0000)]
2005-12-12 Josh Stone <joshua.i.stone@intel.com>
* tapset/context.stp (execname,pid,tid,ppid,pexecname,gid,egid,uid,euid):
Removed in_interrupt checks and other pointer checks. We now operate on
the assumption that "current" and its related data are always valid.
fche [Mon, 12 Dec 2005 17:39:53 +0000 (17:39 +0000)]
2005-12-12 Frank Ch. Eigler <fche@redhat.com>
Fix parse tree pretty-printer.
* staptree.h (print_format): Add raw_components field.
* parse.cxx (parse_symbol): Set it.
* staptree.cxx (lex_cast_qstring): Copy it here too.
(binary_expression::print): Add a space around operator, due to
lexical ambiguity (expr % paren-expr) vs %( preprocessor op.
(array_in:: foreach_loop:: arrayindex::print): Print base as indexable.
(print_format::string_to_components): Use parse_error, not semantic.
(print_format::print): Properly quote formatting string. Print
histogram argument.
* translate.cxx (visit_print_format): Properly quote formatting string.
(varlock): Reword lock timeout error message.
* testsuite/buildok/printf.stp: Add some quoting troublemakers.
* testsuite/parseok/unparser.stp: New file.
roland [Mon, 12 Dec 2005 05:52:08 +0000 (05:52 +0000)]
2005-12-11 Roland McGrath <roland@redhat.com>
PR 1916
* configure.ac: Grok --with-elfutils.
* Makefile.am [BUILD_ELFUTILS] (install-elfutils, stamp-elfutils):
New targets.
[BUILD_ELFUTILS] (stap_LDFLAGS, stap_LDFLAGS): Add flags
to point at local elfutils build.
[BUILD_ELFUTILS] (BUILT_SOURCES): Add stamp-elfutils.
[BUILD_ELFUTILS] (stap_DEPENDENCIES): New variable.
[BUILD_ELFUTILS] (lib-elfutils/libdw.so): New target.
[BUILD_ELFUTILS] (install-exec-local): Depend on install-elfutils.
(loc2c_test_LDADD): Set this to $(stap_LDADD).
(loc2c_test_CPPFLAGS, loc2c_test_LDFLAGS): New variables.
* Makefile.in: Regenerated.
* compile: New file from automakeland.
* systemtap.spec.in (elfutils_version): Require 0.118 or later.
[bundled_elfutils]: Remove old hacks for building elfutils, and rely
on configure --with-elfutils instead.
roland [Mon, 12 Dec 2005 05:52:00 +0000 (05:52 +0000)]
2005-12-11 Roland McGrath <roland@redhat.com>
PR 1916
* configure.ac: Grok --with-elfutils.
* Makefile.am [BUILD_ELFUTILS] (install-elfutils, stamp-elfutils):
New targets.
[BUILD_ELFUTILS] (stap_LDFLAGS, stap_LDFLAGS): Add flags
to point at local elfutils build.
[BUILD_ELFUTILS] (BUILT_SOURCES): Add stamp-elfutils.
[BUILD_ELFUTILS] (stap_DEPENDENCIES): New variable.
[BUILD_ELFUTILS] (lib-elfutils/libdw.so): New target.
[BUILD_ELFUTILS] (install-exec-local): Depend on install-elfutils.
(loc2c_test_LDADD): Set this to $(stap_LDADD).
(loc2c_test_CPPFLAGS, loc2c_test_LDFLAGS): New variables.
* Makefile.in: Regenerated.
* compile: New file from automakeland.
* systemtap.spec.in (elfutils_version): Require 0.118 or later.
[bundled_elfutils]: Remove old hacks for building elfutils, and rely
on configure --with-elfutils instead.
* Makefile.am (pkglibexecdir): New variable.
(AM_CPPFLAGS): Use it.
(pkglibexec_PROGRAMS): Set this instead of noinst_PROGRAMS with stpd.
(pkglibexec_SCRIPTS, CLEANFILES): New variables.
(install-exec-local): Target removed.
* runtest.sh: Set LD_LIBRARY_PATH when lib-elfutils is in use.
roland [Mon, 12 Dec 2005 05:51:54 +0000 (05:51 +0000)]
2005-12-11 Roland McGrath <roland@redhat.com>
* configure.ac: Bump version to 0.5.1 for test builds.
* systemtap.spec.in: Remove ExclusiveArch.
* configure: Regenerated.
PR 1916
* configure.ac: Grok --with-elfutils.
* Makefile.am [BUILD_ELFUTILS] (install-elfutils, stamp-elfutils):
New targets.
[BUILD_ELFUTILS] (stap_LDFLAGS, stap_LDFLAGS): Add flags
to point at local elfutils build.
[BUILD_ELFUTILS] (BUILT_SOURCES): Add stamp-elfutils.
[BUILD_ELFUTILS] (stap_DEPENDENCIES): New variable.
[BUILD_ELFUTILS] (lib-elfutils/libdw.so): New target.
[BUILD_ELFUTILS] (install-exec-local): Depend on install-elfutils.
(loc2c_test_LDADD): Set this to $(stap_LDADD).
(loc2c_test_CPPFLAGS, loc2c_test_LDFLAGS): New variables.
* Makefile.in: Regenerated.
* compile: New file from automakeland.
* systemtap.spec.in (elfutils_version): Require 0.118 or later.
[bundled_elfutils]: Remove old hacks for building elfutils, and rely
on configure --with-elfutils instead.
roland [Mon, 12 Dec 2005 05:51:46 +0000 (05:51 +0000)]
2005-12-11 Roland McGrath <roland@redhat.com>
* Makefile.am (pkglibexecdir): New variable.
(AM_CPPFLAGS): Use it.
(pkglibexec_PROGRAMS): Set this instead of noinst_PROGRAMS with stpd.
(pkglibexec_SCRIPTS, CLEANFILES): New variables.
(install-exec-local): Target removed.
* runtest.sh: Set LD_LIBRARY_PATH when lib-elfutils is in use.
fche [Thu, 8 Dec 2005 23:49:23 +0000 (23:49 +0000)]
2005-12-08 Frank Ch. Eigler <fche@elastic.org>
PR 1937
* buildrun.cxx (run_pass): Pass new "-d PID" option to stpd.
Set SIGHUP to SIG_IGN too.
2005-12-08 Frank Ch. Eigler <fche@elastic.org>
PR 1937
* stpd.c (main): Support new "-d" option.
(usage): Document it.
* librelay.c (driver_poll): New function to react to death of
driver process.
(stp_main_loop): Call it if "-d PID" given. Treat SIGHUP like others.
hunt [Thu, 8 Dec 2005 18:57:45 +0000 (18:57 +0000)]
2005-12-08 Martin Hunt <hunt@redhat.com>
* map.c (_new_map_create): Only increment map size if a node
was moved off the free list.
(_stp_map_size): New function.
(_stp_pmap_size): New function.
* map.c (_stp_map_init): Use kmalloc() to allocate individual
nodes instead of using vmalloc() to allocate one big chunk.
(_stp_map_new): Use kmalloc.
(_stp_pmap_new): Use kmalloc. Return a PMAP.
(__stp_map_del): New function. Free all the nodes in a map.
(_stp_map_del): Call __stp_map_del() then free map struct.
(_stp_pmap_del): Takes a PMAP. Calls __stp_map_del() for
each cpu.
(_stp_pmap_printn_cpu): Change arg to PMAP.
(_stp_pmap_agg): Change arg to PMAP.
(_stp_pmap_get_agg): Change arg to PMAP.
* map-stat.c (_stp_pmap_new_hstat_linear): Use PMAP
instead of MAP. Fix allocations.
(_stp_pmap_new_hstat_log): Ditto.
* pmap-gen.c Fix all functions to take or return PMAPS
instead of MAPS.
* alloc.c: Remove everything except kmalloc_node().
All runtime code now uses kmalloc() directly.
kevinrs [Wed, 7 Dec 2005 18:15:49 +0000 (18:15 +0000)]
* system_calls.stp:
* alphabatized for easier navigation
* removed comments from reference to void pointer args
* removed reference to some unsafe copy_from_user funcs
* added final aliases for i386
* aux_syscalls.stp
* commented out embedded C functions that made use of
copy_from_user(), a function that might sleep and that
was causing Oops on my machine when sleep was called
from invalid context.
fche [Wed, 7 Dec 2005 03:25:08 +0000 (03:25 +0000)]
2005-12-06 Frank Ch. Eigler <fche@elastic.org>
PR 1934.
* tapsets.cxx (resolve_prologue_endings2): Add new heuristic for
tail-call optimized functions.
(query_func_info): Make somewhat less verbose.
graydon [Fri, 2 Dec 2005 23:28:03 +0000 (23:28 +0000)]
2005-12-02 Graydon Hoare <graydon@redhat.com>
* elaborate.cxx (mutated_var_collector): Forward
traversal portion of calls to base class.
(mutated_var_collector::visit_arrayindex): Resolve
arrayindex-into-histogram expression as pe_long.
(typeresolution_info::visit_print_format): Traverse
into histogram if present.
fche [Fri, 2 Dec 2005 19:34:36 +0000 (19:34 +0000)]
2005-12-02 Frank Ch. Eigler <fche@elastic.org>
* configure.ac: Bump version number.
* stap.1.in: Document some of the new print/stats stuff.
* configure: Regenerated.
* systemtap.spec.in: Enable ia64 and ppc builds.
fche [Wed, 30 Nov 2005 22:19:03 +0000 (22:19 +0000)]
2005-11-30 Frank Ch. Eigler <fche@redhat.com>
PR 1276
From Josh Stone <joshua.i.stone@intel.com>:
* tapsets.cxx (profile_derived_probe, profile_builder,
register_standard_tapsets): Support timer.profile variety.
* stapprobes.5.in: Document it.
* testsuite/builok/fourteen.stp: Test its buildability.
hunt [Wed, 30 Nov 2005 08:38:13 +0000 (08:38 +0000)]
2005-11-30 Martin Hunt <hunt@redhat.com>
* transport.h (STP_WORK_TIMER): Declare.
* transport.c (_stp_work_queue): Wake up every STP_WORK_QUEUE
jiffies and check IO and exit status.
(_stp_handle_exit): Deleted.
* procfs.c (_stp_proc_write_cmd): Just set exit flag on STP_EXIT.
(_stp_write): Don't call wake_up_interruptible.
graydon [Tue, 29 Nov 2005 01:06:47 +0000 (01:06 +0000)]
[ChangeLog]
2005-11-28 Graydon Hoare <graydon@redhat.com>
* translate.cxx (var::assert_hist_compatible): New method.
(var::hist): New method.
(c_unparser::load_aggregate): New method.
(hist_op_downcaster): Remove, it was a mistake.
(expression_is_hist_op): Likewise.
(c_tmpcounter::visit_print_format): Implement print(@hist(...)).
(c_unparser::visit_print_format): Likewise.
* staptree.h (struct print_format): Add optional hist_op* member.
* staptree.cxx (traversing_visitor::visit_functioncall): Visit
hist_op if present in print_format.
(deep_copy_visitor::visit_print_format): Likewise.
* parse.cxx (parse_symbol): Special case to consume print(@hist(...)).
* elaborate.cxx (typeresolution_info::visit_arrayindex): Fix type inference bug.
(typeresolution_info::visit_foreach_loop): Likewise.
* testsuite/buildok/print_histograms.stp: New test.
[runtime/ChangeLog]
2005-11-28 Graydon Hoare <graydon@redhat.com>
* stat-common.c (_stp_stat_print_histogram): Various formatting
corrections and aesthetic tweaks.
(__stp_stat_add): Correction to linear bucket underflow cases.
hunt [Mon, 28 Nov 2005 22:08:39 +0000 (22:08 +0000)]
2005-11-28 Martin Hunt <hunt@redhat.com>
* alloc.c (__stp_valloc_percpu): Use same code for up and smp.
(_stp_per_cpu_ptr): New macro.
* user/alloc.c: Ditto.
* map.c: Use _stp_map_cpu_ptr().
* map-stat.c: Ditto.
* pmap-gen.c: Ditto.
* runtime.h: Include alloc.c
* user/runtime.h: Ditto.
kevinrs [Mon, 28 Nov 2005 19:09:43 +0000 (19:09 +0000)]
* commented pciconfig_* system calls that failed to resolve to probe
points.
* commented reference to arg stack_start in clone, fork, vfork that
were unable to resolve properly.
* commented arg reference to pt_regs in execve, it is an unsupported
type.
* commented arg reference to union semun arg in semctl, it is an
unsupported type.
* This tapset tested for i386.
roland [Sun, 27 Nov 2005 02:05:00 +0000 (02:05 +0000)]
2005-11-26 Roland McGrath <roland@redhat.com>
* loc2c.c (struct location): Move frame_base member out of the union.
(alloc_location): Initialize it.
(new_synthetic_loc, translate, location_from_address): Update uses.
(emit_loc_value): Don't handle frame_base here.
(c_emit_location): Do it here instead.
(translate): Track USED_DEREF separately for each piece.
Use a temporary struct when allocating a new piece, letting
a pending loc_address piece finish up first.
fche [Thu, 24 Nov 2005 22:45:52 +0000 (22:45 +0000)]
2005-11-24 Frank Ch. Eigler <fche@redhat.com>
PR 1903
* parse.cxx (eval_pp_conditional): Support %( arch == "i686" %) form.
* stap.1.in: Document it.
* testsuite/parseok/fourteen.stp: Test it.
* session.h (architecture): New field.
* main.cxx (main): Initialize it.
graydon [Thu, 24 Nov 2005 05:55:52 +0000 (05:55 +0000)]
2005-11-23 Graydon Hoare <graydon@redhat.com>
* elaborate.h (get_symbol_within_expression): Make visible.
* elaborate.cxx (get_symbol_within_expression): Make non-static.
(stat_decl_collector): New struct.
(semantic_pass_stats): New semantic pass.
(semantic_pass): Call it.
(semantic_pass_symbols): Remove collection of statistic_decls from files.
(visit_stat_op): Only fail if inferred type is not pe_long.
* parse.cxx (parser::parse): Don't pass per-file statistic_decl
into parse_global.
(parser::parse_global): Don't parse global statistic_decls,
they're obsolete.
* parse.hh (parser::parse_global): Adjust signature to match.
* session.h (statistic_decl::operator==): New method.
* staptree.h (print_format::is_empty): New method.
(stapfile::stat_decls): Remove field.
* staptree.cxx (string_to_components): Fix bugs in format-string
parser.
* translate.cxx (var): Make private fields protected.
(var::init): Support HIST_NONE stats.
(aggvar): New struct.
(mapvar::is_parallel): New method.
(mapvar::call_prefix): Use it.
(mapvar::calculate_aggregate): New method.
(mapvar::fetch_existing_aggregate): New method.
(mapvar::get): Support pe_stats.
(mapvar::init): Use is_parallel(), and support HIST_NONE.
(itervar::itervar): Only fault on pe_unknown.
(itervar::start): Use mapvar::is_parallel and
mapvar::fetch_existing_aggregate.
(emit_map_type_instantiations): Include alloc.c before pmap-gen.c.
Include pmap-gen.c for pe_stats maps.
(c_unparser::gensym_aggregate): New method.
(c_unparser::visit_foreach_loop): Handle mapvar::is_parallel case.
(arrayindex_downcaster): New struct.
(expression_is_arrayindex): New function.
(c_tmpcounter::visit_stat_op): New method.
(c_unparser::visit_stat_op): Implement.
(c_unparser::visit_hist_op): Add commentary, still not implemented.
* testsuite/buildok/stat_{insert,extract}.stp: New tests.
* testsuite/semok/ten.stp: Correct for changes to global declarations.
* testsuite/semko/*.stp: Likewise.