]> sourceware.org Git - systemtap.git/blob - tapsets.h
Define __NR_epoll_wait if not defined (PR17462)
[systemtap.git] / tapsets.h
1 // -*- C++ -*-
2 // Copyright (C) 2005-2010 Red Hat Inc.
3 //
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
7 // later version.
8
9 #ifndef TAPSETS_H
10 #define TAPSETS_H
11
12 #include "config.h"
13 #include "staptree.h"
14 #include "elaborate.h"
15
16 void check_process_probe_kernel_support(systemtap_session& s);
17
18 void register_standard_tapsets(systemtap_session& sess);
19 std::vector<derived_probe_group*> all_session_groups(systemtap_session& s);
20 std::string common_probe_init (derived_probe* p);
21 void common_probe_entryfn_prologue (systemtap_session& s, std::string statestr,
22 std::string probe, std::string probe_type,
23 bool overload_processing = true);
24 void common_probe_entryfn_epilogue (systemtap_session& s,
25 bool overload_processing,
26 bool schedule_work_safe);
27
28 void register_tapset_been(systemtap_session& sess);
29 void register_tapset_itrace(systemtap_session& sess);
30 void register_tapset_mark(systemtap_session& sess);
31 void register_tapset_procfs(systemtap_session& sess);
32 void register_tapset_timers(systemtap_session& sess);
33 void register_tapset_netfilter(systemtap_session& sess);
34 void register_tapset_perf(systemtap_session& sess);
35 void register_tapset_utrace(systemtap_session& sess);
36 void register_tapset_java(systemtap_session& sess);
37
38 std::string path_remove_sysroot(const systemtap_session& sess,
39 const std::string& path);
40
41 // ------------------------------------------------------------------------
42 // Generic derived_probe_group: contains an ordinary vector of the
43 // given type. It provides only the enrollment function.
44
45 template <class DP> struct generic_dpg: public derived_probe_group
46 {
47 protected:
48 std::vector <DP*> probes;
49 public:
50 generic_dpg () {}
51 void enroll (DP* probe) { probes.push_back (probe); }
52 };
53
54
55 // ------------------------------------------------------------------------
56 // An update visitor that allows replacing assignments with a function call
57
58 struct var_expanding_visitor: public update_visitor
59 {
60 static unsigned tick;
61 std::stack<defined_op*> defined_ops;
62 std::set<std::string> valid_ops;
63 const std::string *op;
64
65 var_expanding_visitor ();
66 void visit_assignment (assignment* e);
67 void visit_pre_crement (pre_crement* e);
68 void visit_post_crement (post_crement* e);
69 void visit_delete_statement (delete_statement* s);
70 void visit_defined_op (defined_op* e);
71
72 void provide_lvalue_call(functioncall* fcall);
73
74 private:
75 std::stack<functioncall**> target_symbol_setter_functioncalls;
76 bool rewrite_lvalue(const token *tok, const std::string& eop,
77 expression*& lvalue, expression*& rvalue);
78 };
79
80 #endif // TAPSETS_H
81
82 /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */
This page took 0.037666 seconds and 5 git commands to generate.