mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
Fix leak where mem_info__put wouldn't release the maps/map as used by perf mem. Add exit functions and use elsewhere that the maps and map are released. Signed-off-by: Ian Rogers <[email protected]> Cc: K Prateek Nayak <[email protected]> Cc: Ravi Bangoria <[email protected]> Cc: Sandipan Das <[email protected]> Cc: Anshuman Khandual <[email protected]> Cc: German Gomez <[email protected]> Cc: James Clark <[email protected]> Cc: Nick Terrell <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Changbin Du <[email protected]> Cc: liuwenyu <[email protected]> Cc: Yang Jihong <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Miguel Ojeda <[email protected]> Cc: Song Liu <[email protected]> Cc: Leo Yan <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Kan Liang <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Yanteng Si <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Paolo Bonzini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
30 lines
538 B
C
30 lines
538 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef __PERF_MAP_SYMBOL
|
|
#define __PERF_MAP_SYMBOL 1
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct maps;
|
|
struct map;
|
|
struct symbol;
|
|
|
|
struct map_symbol {
|
|
struct maps *maps;
|
|
struct map *map;
|
|
struct symbol *sym;
|
|
};
|
|
|
|
struct addr_map_symbol {
|
|
struct map_symbol ms;
|
|
u64 addr;
|
|
u64 al_addr;
|
|
char al_level;
|
|
u64 phys_addr;
|
|
u64 data_page_size;
|
|
};
|
|
|
|
void map_symbol__exit(struct map_symbol *ms);
|
|
void addr_map_symbol__exit(struct addr_map_symbol *ams);
|
|
|
|
#endif // __PERF_MAP_SYMBOL
|