summaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorswagiaal <swagiaal>2010-08-31 20:10:42 +0000
committerswagiaal <swagiaal>2010-08-31 20:10:42 +0000
commit3cf2892284020e27403d7e60cee9b2654a154cc4 (patch)
tree621833a8ec8f29ba4600f305cb4591546d69a10a /gdb/symmisc.c
parent2aff8d5fea40a80b77a1c26e866170c7acdf2051 (diff)
downloadgdb-3cf2892284020e27403d7e60cee9b2654a154cc4.tar.gz
Create and use a specialized bcache type for psymbols
2010-08-31 Sami Wagiaalla <swagiaal@redhat.com> * symfile.c (reread_symbols): Use psymbol_bcache_free, and psymbol_bcache_init. * psymtab.h (psymbol_bcache_init): New function prototype. (psymbol_bcache_free): New function prototype. (psymbol_bcache_get_bcache): New function prototype. * psymtab.c (psymbol_bcache_init): New function. (psymbol_bcache_free): New function. (psymbol_bcache_full): New function. (psymbol_bcache_get_bcache): New function. (add_psymbol_to_bcache): use psymbol_bcache_full. * objfiles.h (psymbol_cache): Change type of psymbol_cache to psymbol_bcache. * symmisc.c (print_symbol_bcache_statistics): Updated. (print_objfile_statistics): Updated. * objfiles.c (allocate_objfile): Use psymbol_bcache_init to initialize psymbol_cache. (free_objfile): Use psymbol_bcache_free.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 62e6b97263c..ef6321613de 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -130,7 +130,8 @@ print_symbol_bcache_statistics (void)
ALL_PSPACE_OBJFILES (pspace, objfile)
{
printf_filtered (_("Byte cache statistics for '%s':\n"), objfile->name);
- print_bcache_statistics (objfile->psymbol_cache, "partial symbol cache");
+ print_bcache_statistics (psymbol_bcache_get_bcache (objfile->psymbol_cache),
+ "partial symbol cache");
print_bcache_statistics (objfile->macro_cache, "preprocessor macro cache");
print_bcache_statistics (objfile->filename_cache, "file name cache");
}
@@ -188,7 +189,8 @@ print_objfile_statistics (void)
printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
obstack_memory_used (&objfile->objfile_obstack));
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
- bcache_memory_used (objfile->psymbol_cache));
+ bcache_memory_used (psymbol_bcache_get_bcache
+ (objfile->psymbol_cache)));
printf_filtered (_(" Total memory used for macro cache: %d\n"),
bcache_memory_used (objfile->macro_cache));
printf_filtered (_(" Total memory used for file name cache: %d\n"),