diff options
Diffstat (limited to 'tools/perf/util/symbol.c')
| -rw-r--r-- | tools/perf/util/symbol.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 62b2dd2253eb..1466814ebada 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
| @@ -2091,16 +2091,14 @@ static bool symbol__read_kptr_restrict(void) | |||
| 2091 | 2091 | ||
| 2092 | int symbol__annotation_init(void) | 2092 | int symbol__annotation_init(void) |
| 2093 | { | 2093 | { |
| 2094 | if (symbol_conf.init_annotation) | ||
| 2095 | return 0; | ||
| 2096 | |||
| 2094 | if (symbol_conf.initialized) { | 2097 | if (symbol_conf.initialized) { |
| 2095 | pr_err("Annotation needs to be init before symbol__init()\n"); | 2098 | pr_err("Annotation needs to be init before symbol__init()\n"); |
| 2096 | return -1; | 2099 | return -1; |
| 2097 | } | 2100 | } |
| 2098 | 2101 | ||
| 2099 | if (symbol_conf.init_annotation) { | ||
| 2100 | pr_warning("Annotation being initialized multiple times\n"); | ||
| 2101 | return 0; | ||
| 2102 | } | ||
| 2103 | |||
| 2104 | symbol_conf.priv_size += sizeof(struct annotation); | 2102 | symbol_conf.priv_size += sizeof(struct annotation); |
| 2105 | symbol_conf.init_annotation = true; | 2103 | symbol_conf.init_annotation = true; |
| 2106 | return 0; | 2104 | return 0; |
