diff options
Diffstat (limited to 'tools/perf/util/annotate.h')
| -rw-r--r-- | tools/perf/util/annotate.h | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 1c6335b8333a..962780559176 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -271,8 +271,7 @@ struct annotated_source {  	struct sym_hist	   *histograms;  }; -struct annotation { -	struct mutex lock; +struct LOCKABLE annotation {  	u64			max_coverage;  	u64			start;  	u64			hit_cycles; @@ -298,9 +297,15 @@ struct annotation {  	struct annotated_source *src;  }; -void annotation__init(struct annotation *notes); +static inline void annotation__init(struct annotation *notes __maybe_unused) +{ +}  void annotation__exit(struct annotation *notes); +void annotation__lock(struct annotation *notes) EXCLUSIVE_LOCK_FUNCTION(*notes); +void annotation__unlock(struct annotation *notes) UNLOCK_FUNCTION(*notes); +bool annotation__trylock(struct annotation *notes) EXCLUSIVE_TRYLOCK_FUNCTION(true, *notes); +  static inline int annotation__cycles_width(struct annotation *notes)  {  	if (notes->have_cycles && notes->options->show_minmax_cycle)  | 
