From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Thu, 22 Mar 2012 18:09:08 +0000 (-0300)
Subject: Merge branch 'perf/urgent' into perf/core
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d09eb7a9a2ca4d7ed32f7b440bea78c0622814a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git

Merge branch 'perf/urgent' into perf/core

Merge Reason: to pick the fix:

 commit e7f01d1
     perf tools: Use scnprintf where applicable

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---

0d09eb7a9a2ca4d7ed32f7b440bea78c0622814a
diff --cc tools/perf/util/ui/browsers/hists.c
index c4173c9733bb,bb9197c9c4a4..d7a1c4afe28b
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@@ -840,13 -837,10 +840,13 @@@ static int hists__browser_title(struct 
  	unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE];
  
  	nr_events = convert_unit(nr_events, &unit);
- 	printed = snprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name);
+ 	printed = scnprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name);
  
 +	if (self->uid_filter_str)
 +		printed += snprintf(bf + printed, size - printed,
 +				    ", UID: %s", self->uid_filter_str);
  	if (thread)
- 		printed += snprintf(bf + printed, size - printed,
+ 		printed += scnprintf(bf + printed, size - printed,
  				    ", Thread: %s(%d)",
  				    (thread->comm_set ? thread->comm : ""),
  				    thread->pid);