2 // Copyright (C) 2005-2010 Red Hat Inc.
4 // This file is part of systemtap, and is free software. You can
5 // redistribute it and/or modify it under the terms of the GNU General
6 // Public License (GPL); either version 2, or (at your option) any
14 #include "elaborate.h"
16 void register_standard_tapsets(systemtap_session
& sess
);
17 std::vector
<derived_probe_group
*> all_session_groups(systemtap_session
& s
);
18 std::string
common_probe_init (derived_probe
* p
);
19 void common_probe_entryfn_prologue (translator_output
* o
, std::string statestr
,
20 std::string probe
, bool overload_processing
= true);
21 void common_probe_entryfn_epilogue (translator_output
* o
, bool overload_processing
= true);
23 void register_tapset_been(systemtap_session
& sess
);
24 void register_tapset_itrace(systemtap_session
& sess
);
25 void register_tapset_mark(systemtap_session
& sess
);
26 void register_tapset_procfs(systemtap_session
& sess
);
27 void register_tapset_timers(systemtap_session
& sess
);
28 void register_tapset_perf(systemtap_session
& sess
);
29 void register_tapset_utrace(systemtap_session
& sess
);
32 // ------------------------------------------------------------------------
33 // Generic derived_probe_group: contains an ordinary vector of the
34 // given type. It provides only the enrollment function.
36 template <class DP
> struct generic_dpg
: public derived_probe_group
39 std::vector
<DP
*> probes
;
42 void enroll (DP
* probe
) { probes
.push_back (probe
); }
46 // ------------------------------------------------------------------------
47 // An update visitor that allows replacing assignments with a function call
49 struct var_expanding_visitor
: public update_visitor
52 std::stack
<functioncall
**> target_symbol_setter_functioncalls
;
53 std::stack
<defined_op
*> defined_ops
;
54 std::set
<std::string
> valid_ops
;
55 const std::string
*op
;
57 var_expanding_visitor ();
58 void visit_assignment (assignment
* e
);
59 void visit_pre_crement (pre_crement
* e
);
60 void visit_post_crement (post_crement
* e
);
61 void visit_delete_statement (delete_statement
* s
);
62 void visit_defined_op (defined_op
* e
);
65 bool rewrite_lvalue(const token
*tok
, const std::string
& eop
,
66 expression
*& lvalue
, expression
*& rvalue
);
71 /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */