From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Adrian Hunter <adrian.hunter@intel.com>,
Andi Kleen <ak@linux.intel.com>, Ben Cheng <bccheng@google.com>,
David Ahern <dsahern@gmail.com>,
Dongsheng Yang <yangds.fnst@cn.fujitsu.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Mike Galbraith <efault@gmx.de>,
Namhyung Kim <namhyung.kim@lge.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [GIT PULL 00/21] perf/core improvements and fixes
Date: Tue, 10 Dec 2013 09:01:43 -0300 [thread overview]
Message-ID: <20131210120143.GJ8098@ghostprotocols.net> (raw)
In-Reply-To: <20131210114757.GC29875@gmail.com>
Em Tue, Dec 10, 2013 at 12:47:57PM +0100, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@ghostprotocols.net> wrote:
> > Em Tue, Dec 10, 2013 at 12:12:29PM +0100, Ingo Molnar escreveu:
> > > Hm, I've unpulled it because 'perf top' crashes on exit, in
> > > dso__delete():
> > 495 if (dso->sname_alloc)
> > 496 free((char *)dso->short_name)
> Btw., instead of trusting flags I'd argue that using the pointer as a
> flag and clearing the pointer too is a much more robust freeing
> pattern in general:
> if (dso->short_name) {
> free(dso->short_name);
> dso->short_name = NULL;
> }
>
> or so ...
This is not an unusual idiom, if you look at tools/perf/util/ev{list,sel}.c,
for instance, you'll see it in many destructors.
In this case there is a micro optimization where sometimes the shortname
is just a pointer to the tail part of the long name, hence the flag.
- Arnaldo
next prev parent reply other threads:[~2013-12-10 12:01 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 19:36 [GIT PULL 00/21] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 01/21] perf trace: Add support for syscalls vs raw_syscalls Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 02/21] perf trace: Fix summary percentage when processing files Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 03/21] tools lib traceevent: Report better error message on bad function args Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 04/21] perf script: Fix symoff printing in callchains Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 05/21] perf script: Add an option to print the source line number Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 06/21] perf record: Fix display of incorrect mmap pages Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 07/21] perf evlist: Remove unnecessary parentheses Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 08/21] perf evlist: Fix max mmap_pages Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 09/21] perf evlist: Fix mmap pages rounding to power of 2 Arnaldo Carvalho de Melo
2013-12-09 19:36 ` [PATCH 10/21] perf kvm: Introduce option -v for perf kvm command Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 11/21] perf kvm: Fix bug in 'stat report' Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 12/21] perf archive: Remove duplicated 'runs' in man page Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 13/21] perf annotate: Fix typo Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 14/21] perf kvm: Move code to generate filename for perf-kvm to function Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 15/21] perf kvm: Make perf kvm diff support --guestmount Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 16/21] tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_alloc() Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 17/21] tools lib traceevent: Get rid of malloc_or_die() in add_event() Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 18/21] tools lib traceevent: Get rid of die() in create_arg_item() Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 19/21] tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_add_filter_str() Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 20/21] tools lib traceevent: Get rid of die() in pevent_filter_clear_trivial() Arnaldo Carvalho de Melo
2013-12-09 19:37 ` [PATCH 21/21] perf symbols: fix bug in usage of the basename() function Arnaldo Carvalho de Melo
2013-12-10 11:07 ` [GIT PULL 00/21] perf/core improvements and fixes Ingo Molnar
2013-12-10 15:47 ` Jiri Olsa
2013-12-10 15:49 ` Ingo Molnar
2013-12-10 11:12 ` Ingo Molnar
2013-12-10 11:44 ` Arnaldo Carvalho de Melo
2013-12-10 11:47 ` Ingo Molnar
2013-12-10 12:01 ` Arnaldo Carvalho de Melo [this message]
2013-12-10 12:07 ` Ingo Molnar
2013-12-10 12:13 ` Adrian Hunter
2013-12-10 12:10 ` Arnaldo Carvalho de Melo
2013-12-10 12:22 ` Adrian Hunter
2013-12-10 12:22 ` Arnaldo Carvalho de Melo
2013-12-10 12:23 ` Arnaldo Carvalho de Melo
2013-12-10 12:24 ` Ingo Molnar
2013-12-11 11:07 ` [tip:perf/core] perf symbols: Remove open coded management of short_name_allocated member tip-bot for Adrian Hunter
2013-12-10 12:18 ` [GIT PULL 00/21] perf/core improvements and fixes Ingo Molnar
2013-12-10 12:46 ` Ingo Molnar
2013-12-10 13:29 ` Arnaldo Carvalho de Melo
2013-12-10 13:49 ` Arnaldo Carvalho de Melo
2013-12-10 15:05 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2018-08-20 16:15 Arnaldo Carvalho de Melo
2018-08-23 8:31 ` Ingo Molnar
2018-08-01 21:36 Arnaldo Carvalho de Melo
2018-08-02 8:03 ` Ingo Molnar
2018-02-06 16:53 Arnaldo Carvalho de Melo
2015-05-04 21:36 Arnaldo Carvalho de Melo
2015-02-11 21:08 Arnaldo Carvalho de Melo
2015-03-05 4:30 ` Victor Kamensky
2015-03-05 6:37 ` Ingo Molnar
2015-03-05 6:49 ` Victor Kamensky
2013-08-28 14:59 Arnaldo Carvalho de Melo
2013-08-29 10:04 ` Ingo Molnar
2013-08-14 18:24 Arnaldo Carvalho de Melo
2013-08-15 7:52 ` Ingo Molnar
2013-01-30 14:46 Arnaldo Carvalho de Melo
2013-01-31 9:27 ` Ingo Molnar
2012-11-09 21:42 Arnaldo Carvalho de Melo
2012-11-12 2:10 ` Namhyung Kim
2012-11-12 13:55 ` Jiri Olsa
2012-11-12 16:01 ` Arnaldo Carvalho de Melo
2012-11-13 1:20 ` Namhyung Kim
2012-11-13 18:11 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131210120143.GJ8098@ghostprotocols.net \
--to=acme@ghostprotocols.net \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=bccheng@google.com \
--cc=dsahern@gmail.com \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=yangds.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).