summaryrefslogtreecommitdiffstats
path: root/session.h
diff options
context:
space:
mode:
authorfche <fche>2006-11-01 01:55:59 +0000
committerfche <fche>2006-11-01 01:55:59 +0000
commitb20febf337c78ba5793a72fccb0acaef6273239d (patch)
treee00da788f060b08c0e4956149113412ebda50d8c /session.h
parent9be994ead1ed762219d6102f15a5a71b707291e1 (diff)
downloadsystemtap-steved-b20febf337c78ba5793a72fccb0acaef6273239d.tar.gz
systemtap-steved-b20febf337c78ba5793a72fccb0acaef6273239d.tar.xz
systemtap-steved-b20febf337c78ba5793a72fccb0acaef6273239d.zip
2006-10-31 Frank Ch. Eigler <fche@redhat.com>
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.
Diffstat (limited to 'session.h')
-rw-r--r--session.h28
1 files changed, 22 insertions, 6 deletions
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 <string>
#include <vector>
#include <iostream>
@@ -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<std::string> include_path;
@@ -107,13 +114,20 @@ struct systemtap_session
std::vector<stapfile*> files;
std::vector<vardecl*> globals;
std::vector<functiondecl*> functions;
- derived_probe_group_container probes;
+ std::vector<derived_probe*> probes; // see also *_probes groups below
std::vector<embeddedcode*> embeds;
std::map<std::string, statistic_decl> stat_decls;
// XXX: vector<*> instead please?
- // module-referencing file handles
- std::map<std::string,int> 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.
};