public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@kernel.org>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	"Steven Rostedt (Red Hat)" <rostedt@goodmis.org>,
	Oleg Nesterov <oleg@redhat.com>,
	"David A. Long" <dave.long@linaro.org>,
	systemtap@sourceware.org, yrl.pp-manager.tt@hitachi.com,
	Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH -tip v2 1/2] [CLEANUP] perf-probe: Expand given path to absolute path
Date: Fri, 27 Dec 2013 09:20:11 -0500	[thread overview]
Message-ID: <52BD8C9B.8030206@gmail.com> (raw)
In-Reply-To: <52BD1ACA.7030506@hitachi.com>

On 12/27/13, 1:14 AM, Masami Hiramatsu wrote:
> Nowhere, since there is no terminal code for user
> command interface.
>
> Those memories are released when the program terminated.
> I think it is just a waste of the time to free the memory
> pieces which are not used(and allocated) repeatedly.
> Or, is there any chance to call this part directly from
> other command?

Most of the functionality has a destructor to clean up memory 
allocations. probe code needs to follow suit.

e.g, from builtin-record.c:

     err = __cmd_record(&record, argc, argv);

     perf_evlist__munmap(evsel_list);
     perf_evlist__close(evsel_list);
out_free_fd:
     perf_evlist__delete_maps(evsel_list);
out_symbol_exit:
     symbol__exit();

and __cmd_record ends by cleaning up the session struct.

David

  reply	other threads:[~2013-12-27 14:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-26  5:41 [PATCH -tip v2 0/2] perf-probe: Dwarf support for uprobes Masami Hiramatsu
2013-12-26  5:41 ` [PATCH -tip v2 1/2] [CLEANUP] perf-probe: Expand given path to absolute path Masami Hiramatsu
2013-12-26 14:14   ` David Ahern
2013-12-26 14:22     ` Arnaldo Carvalho de Melo
2013-12-27  6:14       ` Masami Hiramatsu
2013-12-27 14:20         ` David Ahern [this message]
2013-12-27 17:49           ` Arnaldo Carvalho de Melo
2013-12-27 19:25             ` Arnaldo Carvalho de Melo
2014-01-12 18:39   ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2013-12-26  5:41 ` [PATCH -tip v2 2/2] perf-probe: Support basic dwarf-based operations on uprobe events Masami Hiramatsu
2013-12-26 14:38   ` David Ahern
2013-12-26 18:38     ` Arnaldo Carvalho de Melo
2013-12-27  6:52     ` Masami Hiramatsu
2014-01-12 18:39   ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu

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=52BD8C9B.8030206@gmail.com \
    --to=dsahern@gmail.com \
    --cc=acme@ghostprotocols.net \
    --cc=dave.long@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=systemtap@sourceware.org \
    --cc=yrl.pp-manager.tt@hitachi.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