From 5f0a03a685a11bda62d69588f39e3fc26375d180 Mon Sep 17 00:00:00 2001 From: Jim Keniston Date: Fri, 18 Apr 2008 16:21:18 -0700 Subject: PR 4311 - Function boundary tracing without debuginfo: Phase I * tapsets.cxx: Major rework of dwflpp, dwarf_query, and related code to make do with elf info if dwarf info is absent, or (in the case of vmlinux) make do with a System.map-style symbol table if even the elf file is absent. * main.cxx: Use getopt_long instead of getopt. Added --kelf, --kmap, --ignore-vmlinux, and --ignore-dwarf. * hash.cxx, session.h, stap.1.in: Added --kelf, --kmap, --ignore-vmlinux, and --ignore-dwarf. --- hash.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'hash.cxx') diff --git a/hash.cxx b/hash.cxx index d05be268..c41600d2 100644 --- a/hash.cxx +++ b/hash.cxx @@ -97,6 +97,21 @@ find_hash (systemtap_session& s, const string& script) h.add(s.merge); // '-M' h.add(s.timing); // '-t' h.add(s.prologue_searching); // '-P' + h.add(s.ignore_vmlinux); // --ignore-vmlinux + h.add(s.ignore_dwarf); // --ignore-dwarf + h.add(s.consult_symtab); // --kelf, --kmap + if (!s.kernel_symtab_path.empty()) // --kmap + { + h.add(s.kernel_symtab_path); + if (stat(s.kernel_symtab_path.c_str(), &st) == 0) + { + // NB: stat of /proc/kallsyms always returns size=0, mtime=now... + // which is a good reason to use the default /boot/System.map-2.6.xx + // instead. + h.add(st.st_size); + h.add(st.st_mtime); + } + } for (unsigned i = 0; i < s.macros.size(); i++) h.add(s.macros[i]); -- cgit