diff options
Diffstat (limited to 'kernel/gcov/gcov.h')
-rw-r--r-- | kernel/gcov/gcov.h | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/kernel/gcov/gcov.h b/kernel/gcov/gcov.h index 060073ebf7a..040c6980df0 100644 --- a/kernel/gcov/gcov.h +++ b/kernel/gcov/gcov.h | |||
@@ -21,9 +21,10 @@ | |||
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 | 24 | #define GCOV_COUNTERS 10 |
25 | #define GCOV_DATA_MAGIC ((unsigned int) 0x67636461) | 25 | #define GCOV_DATA_MAGIC ((unsigned int) 0x67636461) |
26 | #define GCOV_TAG_FUNCTION ((unsigned int) 0x01000000) | 26 | #define GCOV_TAG_FUNCTION ((unsigned int) 0x01000000) |
27 | #define GCOV_TAG_FUNCTION_LENGTH 3 | ||
27 | #define GCOV_TAG_COUNTER_BASE ((unsigned int) 0x01a10000) | 28 | #define GCOV_TAG_COUNTER_BASE ((unsigned int) 0x01a10000) |
28 | #define GCOV_TAG_FOR_COUNTER(count) \ | 29 | #define GCOV_TAG_FOR_COUNTER(count) \ |
29 | (GCOV_TAG_COUNTER_BASE + ((unsigned int) (count) << 17)) | 30 | (GCOV_TAG_COUNTER_BASE + ((unsigned int) (count) << 17)) |
@@ -34,10 +35,38 @@ typedef long gcov_type; | |||
34 | typedef long long gcov_type; | 35 | typedef long long gcov_type; |
35 | #endif | 36 | #endif |
36 | 37 | ||
38 | /* | ||
39 | * Source module info. The data structure is used in both runtime and | ||
40 | * profile-use phase. | ||
41 | */ | ||
42 | struct gcov_module_info { | ||
43 | unsigned int ident; | ||
44 | /* | ||
45 | * This is overloaded to mean two things: | ||
46 | * (1) means FDO/LIPO in instrumented binary. | ||
47 | * (2) means IS_PRIMARY in persistent file or memory copy used in profile-use. | ||
48 | */ | ||
49 | unsigned int is_primary; | ||
50 | unsigned int is_exported; | ||
51 | unsigned int lang; | ||
52 | char *da_filename; | ||
53 | char *source_filename; | ||
54 | unsigned int num_quote_paths; | ||
55 | unsigned int num_bracket_paths; | ||
56 | unsigned int num_cpp_defines; | ||
57 | unsigned int num_cpp_includes; | ||
58 | unsigned int num_cl_args; | ||
59 | char *string_array[1]; | ||
60 | }; | ||
61 | |||
62 | |||
37 | /** | 63 | /** |
38 | * struct gcov_fn_info - profiling meta data per function | 64 | * struct gcov_fn_info - profiling meta data per function |
39 | * @ident: object file-unique function identifier | 65 | * @ident: object file-unique function identifier |
40 | * @checksum: function checksum | 66 | * @lineno_checksum: function lineno checksum |
67 | * @cfg_checksum: function cfg checksum | ||
68 | * @dc_offset: direct call offset | ||
69 | * @name: function name | ||
41 | * @n_ctrs: number of values per counter type belonging to this function | 70 | * @n_ctrs: number of values per counter type belonging to this function |
42 | * | 71 | * |
43 | * This data is generated by gcc during compilation and doesn't change | 72 | * This data is generated by gcc during compilation and doesn't change |
@@ -45,7 +74,10 @@ typedef long long gcov_type; | |||
45 | */ | 74 | */ |
46 | struct gcov_fn_info { | 75 | struct gcov_fn_info { |
47 | unsigned int ident; | 76 | unsigned int ident; |
48 | unsigned int checksum; | 77 | unsigned int lineno_checksum; |
78 | unsigned int cfg_checksum; | ||
79 | unsigned int dc_offset; | ||
80 | const char *name; | ||
49 | unsigned int n_ctrs[0]; | 81 | unsigned int n_ctrs[0]; |
50 | }; | 82 | }; |
51 | 83 | ||
@@ -67,9 +99,11 @@ struct gcov_ctr_info { | |||
67 | /** | 99 | /** |
68 | * struct gcov_info - profiling data per object file | 100 | * struct gcov_info - profiling data per object file |
69 | * @version: gcov version magic indicating the gcc version used for compilation | 101 | * @version: gcov version magic indicating the gcc version used for compilation |
102 | * @modinfo: additional module information | ||
70 | * @next: list head for a singly-linked list | 103 | * @next: list head for a singly-linked list |
71 | * @stamp: time stamp | 104 | * @stamp: time stamp |
72 | * @filename: name of the associated gcov data file | 105 | * @filename: name of the associated gcov data file |
106 | * @eof_pos: end position of profile data | ||
73 | * @n_functions: number of instrumented functions | 107 | * @n_functions: number of instrumented functions |
74 | * @functions: function data | 108 | * @functions: function data |
75 | * @ctr_mask: mask specifying which counter types are active | 109 | * @ctr_mask: mask specifying which counter types are active |
@@ -80,9 +114,11 @@ struct gcov_ctr_info { | |||
80 | */ | 114 | */ |
81 | struct gcov_info { | 115 | struct gcov_info { |
82 | unsigned int version; | 116 | unsigned int version; |
117 | struct gcov_module_info *mod_info; | ||
83 | struct gcov_info *next; | 118 | struct gcov_info *next; |
84 | unsigned int stamp; | 119 | unsigned int stamp; |
85 | const char *filename; | 120 | const char *filename; |
121 | unsigned int eof_pos; | ||
86 | unsigned int n_functions; | 122 | unsigned int n_functions; |
87 | const struct gcov_fn_info *functions; | 123 | const struct gcov_fn_info *functions; |
88 | unsigned int ctr_mask; | 124 | unsigned int ctr_mask; |