Debian Codegraph @

stapdyn/dynprobe.h

raw
1 // stapdyn probe declarations
2 // Copyright (C) 2012-2013 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 DYNPROBE_H
10 #define DYNPROBE_H
11
12 #include <string>
13 #include <vector>
14
15 extern "C" {
16 #include <stdint.h>
17 }
18
19
20 // The individual probes' info read from the stap module.
21 struct dynprobe_location {
22 uint64_t index; // The index as counted by the module.
23 uint64_t offset; // The file offset of the probe's address.
24 uint64_t semaphore; // The file offset of the probe's semaphore.
25 uint64_t flags; // The probe's flags.
26 bool return_p; // This is flagged as a return probe
27
28 dynprobe_location(uint64_t index, uint64_t offset,
29 uint64_t semaphore, uint64_t flags);
30
31 bool validate();
32 };
33
34
35 // The probe target info read from the stap module.
36 struct dynprobe_target {
37 std::string path; // The fully resolved path to the file.
38 std::vector<dynprobe_location> probes; // All probes in this target.
39 dynprobe_target(const char* path): path(path) {}
40 };
41
42
43 // Look for probes in the stap module which need Dyninst instrumentation.
44 int find_dynprobes(void* module, std::vector<dynprobe_target>& targets);
45
46 #endif // DYNPROBE_H
47
48 /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */