]> sourceware.org Git - systemtap.git/blame - coveragedb.h
Only run .plt tests on x86.
[systemtap.git] / coveragedb.h
CommitLineData
c3a3c0c9
WC
1// coveragedb.cxx
2// Copyright (C) 2007 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 COVERAGEDB_H
10#define COVERAGEDB_H
11
12#include "session.h"
2203b032 13#include "staptree.h"
c3a3c0c9
WC
14
15#include <string>
16
17
18/*
19
20tuples: file, line number, column, type of object, name
21values: number of times object "pulled_in", number of times "removed",
22times executed
23
24if (compiled == 0) object never compiled
25if (compiled > 0) object compiled
b34237a1
WC
26
27The following are not currently implemented.
c3a3c0c9
WC
28if (executed == 0) never executed
29if (executed > 0) executed
30
31
32Want to make sure that the data base accurately reflects testing.
331) atomic updates, either commit all or none of information
342) only update coverage db compile info, if compile successful
353) only update coverage db execute info, if instrumentation run suscessfully
36
37
38Would like to have something that looks for interesting features in db:
39
40list which things are not compile
41list which things are not exectuted
42
43ratio of compiled/total (overall, by file, by line)
44ratio of executed/total (overall, by file, by line)
45
46*/
47
b34237a1
WC
48enum db_type {
49 db_type_probe = 1,
50 db_type_function = 2,
51 db_type_local = 3,
52 db_type_global = 4,
53};
54
c3a3c0c9
WC
55class coverage_element {
56public:
57 std::string file;
58 int line;
59 int col;
b34237a1 60 int type;
c3a3c0c9
WC
61 std::string name;
62 std::string parent;
63 int compiled;
c3a3c0c9
WC
64 int executed;
65
2203b032
JS
66 coverage_element():
67 line(0), col(0), compiled(0), executed(0) {}
c3a3c0c9 68
2203b032
JS
69 coverage_element(source_loc &place):
70 file(place.file->name), line(place.line), col(place.column),
74fe61bc 71 type(0), compiled(0), executed(0) {}
c3a3c0c9
WC
72};
73
b34237a1
WC
74
75
c3a3c0c9
WC
76void print_coverage_info(systemtap_session &s);
77void update_coverage_db(systemtap_session &s);
78
79#endif
80
73267b89 81/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */
This page took 0.06716 seconds and 5 git commands to generate.