From 034a1d8bfa8275785debb0b3dc209377b5b97408 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 21 Aug 2008 13:47:13 -0400 Subject: clarify README instructions to spell out that running the testsuite is optional --- README | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README b/README index 512881af..6b62c772 100644 --- a/README +++ b/README @@ -25,7 +25,7 @@ Build steps: - Install the kernel-debuginfo, kernel-[smp-]devel, gcc and libcap-devel packages (or see below if you are building your own kernels from source). - If avaialable, install your distribution's copy of elfutils and its + If available, install your distribution's copy of elfutils and its development headers/libraries. - Or if desired, download an elfutils source release to build in @@ -48,13 +48,15 @@ Build steps: Consider configuring with "--enable-dejazilla" to automatically contribute to our public test result database. - % make all check + % make all % sudo make install + + To run the full test suite: % sudo make installcheck Tips: -- Systemtap looks for the debug info in these locations: +- By default, systemtap looks for the debug info in these locations: /boot/vmlinux-`uname -r` /usr/lib/debug/lib/modules/`uname -r`/vmlinux /lib/modules/`uname -r`/vmlinux @@ -65,16 +67,13 @@ Building a kernel.org kernel: - Build the kernel using your normal procedures. Enable CONFIG_DEBUG_INFO, CONFIG_KPROBES, and optionally CONFIG_RELAY and CONFIG_DEBUG_FS. +- Run "make install modules_install headers_install" as needed. - Boot into the kernel. - Make sure the large unstripped kernel image 'vmlinux' from your build can be found by systemtap (see above) You can just symlink it to one of these locations. -- Symlink your source directory to these two places, though systemtap - does not at present use such source code. - - /usr/src/kernels/`uname -r` - - /lib/modules/`uname -r`/source - Symlink your build directory to here: - - /lib/modules/`uname -r`/build + /lib/modules/`uname -r`/build - For example, if your kernel source is in /home/me/linux/2.6.17-rc6 and you build your kernel in the source directory, you would do this (be sure you are running the right kernel or `uname -r` -- cgit From 1a398808daab54aba9206e50b9814cdd9290933f Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Fri, 22 Aug 2008 01:02:42 -0400 Subject: Fixed failure of buildok/process-all-probes.stp --- testsuite/ChangeLog | 4 ++++ testsuite/buildok/process-all-probes.stp | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 9c7f8fec..27b0a0c1 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-08-22 Wenji Huang + + * buildok/process-all-probes.stp: Change system-wide probes to detailed ones to avoid including user space ones. + 2008-08-15 David Smith * systemtap.base/utrace_p4.exp: Change system-wide probes from diff --git a/testsuite/buildok/process-all-probes.stp b/testsuite/buildok/process-all-probes.stp index ec6ceab0..91a96514 100755 --- a/testsuite/buildok/process-all-probes.stp +++ b/testsuite/buildok/process-all-probes.stp @@ -2,4 +2,11 @@ // Tests if all probes in the process tapset are resolvable. -probe process.* {} +probe process.create, + process.start, + process.exec, + process.exec_complete, + process.exit, + process.release +{ +} -- cgit From 41c262f3a37ff68519c4d71234097f63c74ee0eb Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 24 Aug 2008 07:52:08 -0400 Subject: source whitespace cleanup --- tapsets.cxx | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tapsets.cxx b/tapsets.cxx index ce8862cf..95a8f967 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -237,7 +237,7 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline() << "#ifdef STP_OVERLOAD"; o->newline() << "c->cycles_sum = 0;"; o->newline() << "c->cycles_base = 0;"; - o->newline() << "#endif"; + o->newline() << "#endif"; */ } @@ -1220,7 +1220,7 @@ struct dwflpp // XXX: it is probably desirable to search other CU's declarations // in the same module. - + if (v->find(name) == v->end()) return NULL; @@ -1257,15 +1257,15 @@ struct dwflpp dwarf_query * q = static_cast(data); int lineno = lines[0]; auto_free_ref free_srcsp(srcsp); - + get_module_dwarf(); - if (line_type == RELATIVE) + if (line_type == RELATIVE) { Dwarf_Addr addr; Dwarf_Line *line; int line_number; - + dwarf_assert ("dwarf_entrypc", dwarf_entrypc (this->function, &addr)); line = dwarf_getsrc_die (this->cu, addr); dwarf_assert ("dwarf_getsrc_die", line == NULL); @@ -1274,7 +1274,7 @@ struct dwflpp } else if (line_type == WILDCARD) function_line (&lineno); - + for (int l = lineno; ; l = l + 1) { set lines_probed; @@ -2125,12 +2125,12 @@ struct dwflpp else { // We have the pointer: cast it to an integral type via &(*(...)) - + // NB: per bug #1187, at one point char*-like types were // automagically converted here to systemtap string values. // For several reasons, this was taken back out, leaving // pointer-to-string "conversion" (copying) to tapset functions. - + ty = pe_long; if (typetag == DW_TAG_array_type) c_translate_array (pool, 1, module_bias, typedie, tail, NULL, 0); @@ -2669,7 +2669,7 @@ dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg), assert (module); assert (cu); dwarf_query * q = static_cast(data); - + string key = module_name + ":" + cu_name; cu_function_cache_t *v = cu_function_cache[key]; if (v == 0) @@ -2680,7 +2680,7 @@ dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg), if (q->sess.verbose > 4) clog << "function cache " << key << " size " << v->size() << endl; } - + string subkey = q->function; if (v->find(subkey) != v->end()) { @@ -2699,7 +2699,7 @@ dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg), { if (q->sess.verbose > 4) clog << "function cache " << key << " match " << func_name << " vs " << subkey << endl; - + rc = (*callback)(& die, data); if (rc != DWARF_CB_OK) break; } @@ -3025,7 +3025,7 @@ dwarf_query::build_blacklist() blfn_ret += ")$"; blfile += ")$"; - if (sess.verbose > 2) + if (sess.verbose > 2) { clog << "blacklist regexps:" << endl; clog << "blfn: " << blfn << endl; @@ -3073,7 +3073,7 @@ dwarf_query::parse_function_spec(string & spec) while (i != e && *i != ':' && *i != '+') file += *i++; - if (*i == ':') + if (*i == ':') { if (*(i + 1) == '*') line_type = WILDCARD; @@ -3101,7 +3101,7 @@ dwarf_query::parse_function_spec(string & spec) if (line_type != WILDCARD) { string::const_iterator dash = i; - + while (dash != e && *dash != '-') dash++; if (dash == e) @@ -3113,7 +3113,7 @@ dwarf_query::parse_function_spec(string & spec) line[1] = lex_cast(string(dash + 1, e)); } } - + if (sess.verbose>2) clog << "parsed '" << spec << "' -> func '"<< function @@ -3705,7 +3705,7 @@ query_cu (Dwarf_Die * cudie, void * arg) if (rc != DWARF_CB_OK) q->query_done = true; - if (q->sess.prologue_searching + if (q->sess.prologue_searching && !q->has_statement_str && !q->has_statement_num) // PR 2608 if (! q->filtered_functions.empty()) q->dw.resolve_prologue_endings (q->filtered_functions); @@ -4297,7 +4297,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) Dwarf_Die *scopes; if (dwarf_getscopes_die (scope_die, &scopes) == 0) return; - + target_symbol *tsym = new target_symbol; print_format* pf = new print_format; @@ -4323,7 +4323,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) { tsym->tok = e->tok; tsym->base_name = "$return"; - + // Ignore any variable that isn't accessible. tsym->saved_conversion_error = 0; this->visit_target_symbol(tsym); // NB: throws nothing ... @@ -4355,16 +4355,16 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) if (e->base_name == "$$locals") continue; break; - + default: continue; } - + const char *diename = dwarf_diename (&result); tsym->tok = e->tok; tsym->base_name = "$"; tsym->base_name += diename; - + // Ignore any variable that isn't accessible. tsym->saved_conversion_error = 0; this->visit_target_symbol(tsym); // NB: throws nothing ... @@ -5019,7 +5019,7 @@ dwarf_builder::build(systemtap_session & sess, sess.sym_kprobes_text_end = lookup_symbol_address (km, "__kprobes_text_end"); if (! sess.sym_stext) sess.sym_stext = lookup_symbol_address (km, "_stext"); - + if (sess.verbose > 2) { clog << "control symbols:" @@ -5103,7 +5103,7 @@ symbol_table::read_symbols(FILE *f, const string& path) line++; if (ret < 3) { - cerr << "Symbol table error: Line " + cerr << "Symbol table error: Line " << line << " of symbol list from " << path @@ -8133,7 +8133,7 @@ mark_builder::build(systemtap_session & sess, mark_cache_const_iterator_pair_t ret; mark_cache_const_iterator_t it; bool matching_format_string = false; - + ret = mark_cache.equal_range(name); for (it = ret.first; it != ret.second; ++it) { -- cgit From cee35f73e024d1f2eacaa42c25b05075fc9039a3 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 24 Aug 2008 07:57:16 -0400 Subject: correct probe point reverse-engineering of probes for which we have no source file / line number --- ChangeLog | 7 +++++++ tapsets.cxx | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3473b3ca..ebbef729 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-24 Frank Ch. Eigler + + * tapsets.cxx (query_statement): Leave empty string for unknown file + name. + (dwarf_derived_probe ctor): Don't synthesize "@filename:lineno" + probe point pieces for unknown files/lines. + 2008-08-21 David Smith * tapsets.cxx (itrace_derived_probe_group::emit_module_decls): diff --git a/tapsets.cxx b/tapsets.cxx index 95a8f967..b924f1fc 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3395,7 +3395,7 @@ query_statement (string const & func, { try { - q->add_probe_point(func, file ? file : "?", + q->add_probe_point(func, file ? file : "", line, scope_die, stmt_addr); } catch (const semantic_error& e) @@ -4587,9 +4587,11 @@ dwarf_derived_probe::dwarf_derived_probe(const string& funcname, { string retro_name = funcname; if (filename != "") + { retro_name += ("@" + string (filename)); - if (line != -1) + if (line > 0) retro_name += (":" + lex_cast (line)); + } comps.push_back (new probe_point::component (fn_or_stmt, new literal_string (retro_name))); -- cgit