perf diff: Add missing hists__init() call at tool start
authorKan Liang <kan.liang@intel.com>
Wed, 22 Oct 2014 19:02:41 +0000 (15:02 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Oct 2014 19:31:06 +0000 (16:31 -0300)
commit9ab1f50876dbb8b962db058259be7aae920d4c25
tree942723e8fb014c5bb0f74afb630d033ff36fd0b6
parent3b10ea7f922b538ba5dcb3d979a6b6b4d07daae2
perf diff: Add missing hists__init() call at tool start

It also uses hists/hist_entries, hists__init() should be called before
creating any evsels.

Otherwise no extra space will be allocated per perf_evsel nor this space
will be initialized when allocating a new perf_evsel instance, resulting
in reads/writes to non allocated space, oops. Fix it.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Link: http://lkml.kernel.org/r/1414004561-22096-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-diff.c