aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/gcov/gcov.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gcov/gcov.h')
-rw-r--r--kernel/gcov/gcov.h65
1 files changed, 11 insertions, 54 deletions
diff --git a/kernel/gcov/gcov.h b/kernel/gcov/gcov.h
index 060073ebf7a6..92c8e22a29ed 100644
--- a/kernel/gcov/gcov.h
+++ b/kernel/gcov/gcov.h
@@ -21,7 +21,6 @@
21 * gcc and need to be kept as close to the original definition as possible to 21 * gcc and need to be kept as close to the original definition as possible to
22 * remain compatible. 22 * remain compatible.
23 */ 23 */
24#define GCOV_COUNTERS 5
25#define GCOV_DATA_MAGIC ((unsigned int) 0x67636461) 24#define GCOV_DATA_MAGIC ((unsigned int) 0x67636461)
26#define GCOV_TAG_FUNCTION ((unsigned int) 0x01000000) 25#define GCOV_TAG_FUNCTION ((unsigned int) 0x01000000)
27#define GCOV_TAG_COUNTER_BASE ((unsigned int) 0x01a10000) 26#define GCOV_TAG_COUNTER_BASE ((unsigned int) 0x01a10000)
@@ -34,60 +33,18 @@ typedef long gcov_type;
34typedef long long gcov_type; 33typedef long long gcov_type;
35#endif 34#endif
36 35
37/** 36/* Opaque gcov_info. The gcov structures can change as for example in gcc 4.7 so
38 * struct gcov_fn_info - profiling meta data per function 37 * we cannot use full definition here and they need to be placed in gcc specific
39 * @ident: object file-unique function identifier 38 * implementation of gcov. This also means no direct access to the members in
40 * @checksum: function checksum 39 * generic code and usage of the interface below.*/
41 * @n_ctrs: number of values per counter type belonging to this function 40struct gcov_info;
42 *
43 * This data is generated by gcc during compilation and doesn't change
44 * at run-time.
45 */
46struct gcov_fn_info {
47 unsigned int ident;
48 unsigned int checksum;
49 unsigned int n_ctrs[0];
50};
51
52/**
53 * struct gcov_ctr_info - profiling data per counter type
54 * @num: number of counter values for this type
55 * @values: array of counter values for this type
56 * @merge: merge function for counter values of this type (unused)
57 *
58 * This data is generated by gcc during compilation and doesn't change
59 * at run-time with the exception of the values array.
60 */
61struct gcov_ctr_info {
62 unsigned int num;
63 gcov_type *values;
64 void (*merge)(gcov_type *, unsigned int);
65};
66 41
67/** 42/* Interface to access gcov_info data */
68 * struct gcov_info - profiling data per object file 43const char *gcov_info_filename(struct gcov_info *info);
69 * @version: gcov version magic indicating the gcc version used for compilation 44unsigned int gcov_info_version(struct gcov_info *info);
70 * @next: list head for a singly-linked list 45struct gcov_info *gcov_info_next(struct gcov_info *info);
71 * @stamp: time stamp 46void gcov_info_link(struct gcov_info *info);
72 * @filename: name of the associated gcov data file 47void gcov_info_unlink(struct gcov_info *prev, struct gcov_info *info);
73 * @n_functions: number of instrumented functions
74 * @functions: function data
75 * @ctr_mask: mask specifying which counter types are active
76 * @counts: counter data per counter type
77 *
78 * This data is generated by gcc during compilation and doesn't change
79 * at run-time with the exception of the next pointer.
80 */
81struct gcov_info {
82 unsigned int version;
83 struct gcov_info *next;
84 unsigned int stamp;
85 const char *filename;
86 unsigned int n_functions;
87 const struct gcov_fn_info *functions;
88 unsigned int ctr_mask;
89 struct gcov_ctr_info counts[0];
90};
91 48
92/* Base interface. */ 49/* Base interface. */
93enum gcov_action { 50enum gcov_action {