perf record: Tweak "Lowering..." warning in record_opts__config_freq

That is, instead of "Lowering default frequency rate to <F>" say
"Lowering default frequency rate from <f> to <F>", specifying the
overridden default frequency <f>, so you don't have to grep through the
source to "remember" that was e.g. 4000.

Signed-off-by: Hans-Peter Nilsson <hp@axis.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20201228031908.B049B203B5@pchp3.se.axis.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Hans-Peter Nilsson 2020-12-28 04:19:08 +01:00 committed by Arnaldo Carvalho de Melo
parent d176db9558
commit c07b45a355

View File

@ -201,10 +201,10 @@ static int record_opts__config_freq(struct record_opts *opts)
* Default frequency is over current maximum.
*/
if (max_rate < opts->freq) {
pr_warning("Lowering default frequency rate to %u.\n"
pr_warning("Lowering default frequency rate from %u to %u.\n"
"Please consider tweaking "
"/proc/sys/kernel/perf_event_max_sample_rate.\n",
max_rate);
opts->freq, max_rate);
opts->freq = max_rate;
}