All of lore.kernel.org
 help / color / mirror / Atom feed
* Question perf annotate: how to free allocated memory of arch->instructions
@ 2018-01-18 14:56 Thomas-Mich Richter
  2018-01-18 16:23 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas-Mich Richter @ 2018-01-18 14:56 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, linux-perf-use., Hendrik Brueckner

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-18 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 14:56 Question perf annotate: how to free allocated memory of arch->instructions Thomas-Mich Richter
2018-01-18 16:23 ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.