From: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
"linux-perf-use." <linux-perf-users@vger.kernel.org>,
Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Subject: Question perf annotate: how to free allocated memory of arch->instructions
Date: Thu, 18 Jan 2018 15:56:00 +0100 [thread overview]
Message-ID: <aa217ab5-6920-cfa6-13e2-38feae4463b5@linux.vnet.ibm.com> (raw)
I have a question regarding the struct arch and its initialization/un_initialization.
Function symbol__disassemble() invokes arch->init() once it has identified the archticture
its running on.
When I execute command ./perf annotate --stdio I discovered that functions
arch__associate_ins_ops()
--> arch__grow_instructions()
are called to create/enlarge the array of machine instructions which require special
annotations like branches, jumps, etc to display arrows etc in the GUI. (At least on s390).
On ARM/ARM64 the arch->priv field also points to malloc'ed space needed for ARM specific
processing.
However there is no uninit() like function to remove any allocated memory and to clean up
before perf terminates.
Is this done on intention to rely on the exit of perf to release any allocated memory?
Are there plans to change this, that is invent an uninit() like function for proper memory free?
Where would be the best place to call this uninit() like function?
Thanks
--
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
next reply other threads:[~2018-01-18 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 14:56 Thomas-Mich Richter [this message]
2018-01-18 16:23 ` Question perf annotate: how to free allocated memory of arch->instructions Arnaldo Carvalho de Melo
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=aa217ab5-6920-cfa6-13e2-38feae4463b5@linux.vnet.ibm.com \
--to=tmricht@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=brueckner@linux.vnet.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
/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).