From b20febf337c78ba5793a72fccb0acaef6273239d Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 1 Nov 2006 01:55:59 +0000 Subject: 2006-10-31 Frank Ch. Eigler Probe registration rework. Offline dwarf processing for better cross-instrumentation. * elaborate.h (derived_probe): Remove registration-related code generation API. Add new function sole_location(). (derived_probe_group): Reworked this and associated classes. * session.h (systemntap_session): Create individual per-category derived_probe_groups. * elaborate.cxx (derived_probe_group): Reworked. (alias_derived_probe): Switch to new derived_probe API. (semantic_pass_symbols): Ditto. * translate.cxx (mapvar init): Check for array initialization error. (emit_module_init): Handle such failures, at least in theory. (emit_module_exit): Switch to new derived_probe_group API. Call cpu_relax() during shutdown busywait. (emit_common_header): Elide context variables for elided handler fns. (c_unparser::emit_probe): Implement new, improved duplicate elimination technique for probe handlers. Leave two older ones behind as compile options for education. * tapsets.cxx (*): Reworked all probe registration code, moving it from derived_probes into derived_probe_groups. Shrunk output code. Temporarily disabled probe timing and perfmon/mark probes. (dwflpp): Use offline reporting, so that module matching and relocation is performed at run time. (dwarf_query): Remove flavour logic, now supplanted by other duplicate elimination code. (dwarf_derived_probe): Reworked construction, centralized module/section/offset computations. * tapsets.h (all_session_groups): New little helper. * main.cxx (main): For pass-2 message, print number of embeds too. * systemtap.spec.in: Add a "BuildRequires: dejagnu" for make check. * configure.ac: Bump version to 0.5.11. * configure: Regenerated. --- session.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'session.h') diff --git a/session.h b/session.h index a60611d4..95d97155 100644 --- a/session.h +++ b/session.h @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2005 Red Hat Inc. +// Copyright (C) 2005, 2006 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -9,7 +9,6 @@ #ifndef SESSION_H #define SESSION_H -#include "elaborate.h" #include #include #include @@ -26,7 +25,14 @@ struct match_node; struct stapfile; struct vardecl; struct functiondecl; -struct derived_probe_group_container; +struct derived_probe; +struct be_derived_probe_group; +struct dwarf_derived_probe_group; +struct timer_derived_probe_group; +struct profile_derived_probe_group; +struct mark_derived_probe_group; +struct hrtimer_derived_probe_group; +struct perfmon_derived_probe_group; struct embeddedcode; struct translator_output; struct unparser; @@ -61,6 +67,7 @@ struct statistic_decl struct systemtap_session { systemtap_session (); + // NB: new POD members likely need to be explicitly cleared in the ctor. // command line args std::vector include_path; @@ -107,13 +114,20 @@ struct systemtap_session std::vector files; std::vector globals; std::vector functions; - derived_probe_group_container probes; + std::vector probes; // see also *_probes groups below std::vector embeds; std::map stat_decls; // XXX: vector<*> instead please? - // module-referencing file handles - std::map module_fds; + // Every probe in these groups must also appear in the + // session.probes vector. + be_derived_probe_group* be_derived_probes; + dwarf_derived_probe_group* dwarf_derived_probes; + timer_derived_probe_group* timer_derived_probes; + profile_derived_probe_group* profile_derived_probes; + mark_derived_probe_group* mark_derived_probes; + hrtimer_derived_probe_group* hrtimer_derived_probes; + perfmon_derived_probe_group* perfmon_derived_probes; // unparser data translator_output* op; @@ -127,6 +141,8 @@ struct systemtap_session unsigned num_errors; // void print_error (const parse_error& e); void print_error (const semantic_error& e); + + // reNB: new POD members likely need to be explicitly cleared in the ctor. }; -- cgit