perf symbols: Fix multiple initialization of symbol system
authorJovi Zhang <bookjovi@gmail.com>
Thu, 9 Sep 2010 16:30:59 +0000 (13:30 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 9 Sep 2010 20:43:35 +0000 (17:43 -0300)
commit85e00b55517a5696282b80836655e6b6f5702df0
treece9e06bed532b0cd473266ccbf86d2f7dd22ee86
parentda34634fd39958725310d2c30c9b4543945f968b
perf symbols: Fix multiple initialization of symbol system

By returning immediately if it was already initialized, do it as well at
symbol__exit, refusing multiple deinitializations.

This fixes problems in the kmem, sched and timechart commands.

Reported-by: Davidlohr Bueso <dave@gnu.org>
Cc: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
LKML-Reference: AANLkTi=9Cn=R8SPMCRp5z+gEjXbaBHeb-AaOtRbuwwcn@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c
tools/perf/util/symbol.h