From 63b4fd1474ec5859fac4c9b710c8f466bcd3b0f7 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Tue, 8 Dec 2009 11:57:00 -0500 Subject: Add .library("lib").mark("mark") and use it for .mark semaphores. tapset-utrace.cxx (TOK_LIBRARY): New. (utrace_derived_probe::utrace_derived_probe): Add library and has_library. (utrace_builder::build): Handle library. (utrace_derived_probe_group::emit_probe_decl): Add sdt_sem_offset to emitted stap_utrace_probes. Add stap_task_finder_target mmap_callback for handling shared library. Handle sdt_sem_offset in emitted_stp_utrace_probe_cb. Add stap_utrace_mmap_found. (register_tapset_utrace): Handle .library tapset-utrace.cxx (TOK_LIBRARY): New. (base_query::base_query): Add path and has_library. (dwarf_derived_probe::dwarf_derived_probe) Likewise. (dwarf_derived_probe::register_patterns): Handle .library (sdt_query::convert_location): Likewise. (dwarf_builder::build): Likewise. (uprobe_derived_probe_group::emit_module_decls): Emit sdt_sem_address. Add sdt_sem_offset to emitted stap_uprobe_spec. Add offset and vm_flags to signature of stap_uprobe_change_plus, and handle sdt_sem_offset. Allow writeable segments in emitted stap_uprobe_mmap_found. sdt_misc.exp: Test .library util.cxx (find_executable): Add env_path to sig and use it in getenv. util.h (find_executable): Likewise. Make "PATH" the default. dtrace.in (provider): Turn on semaphores. sdt.h: Likewise. --- util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util.h') diff --git a/util.h b/util.h index bb6c71bc..8fc64cbd 100644 --- a/util.h +++ b/util.h @@ -15,7 +15,8 @@ int remove_file_or_dir(const char *dir); bool in_group_id (gid_t target_gid); void tokenize(const std::string& str, std::vector& tokens, const std::string& delimiters); -std::string find_executable(const std::string& name); +std::string find_executable(const std::string& name, + const std::string& env_path = "PATH"); const std::string cmdstr_quoted(const std::string& cmd); std::string git_revision(const std::string& path); int stap_system(int verbose, const std::string& command); -- cgit