| От | Neil Conway |
|---|---|
| Тема | MemoryContextStats tweak: show tree structure |
| Дата | |
| Msg-id | 1186447708.16321.70.camel@dell.linuxdev.us.dell.com обсуждение исходный текст |
| Ответы |
Re: MemoryContextStats tweak: show tree structure
Re: MemoryContextStats tweak: show tree structure |
| Список | pgsql-patches |
Previously, MemoryContextStats() simply emitted a line of output for
each MemoryContext. This is fine, but it makes it difficult to see the
shape of the MemoryContext hierarchy. Attached is a trivial patch to
indent each context by "4 * level" spaces, where "level" is the depth of
the node within the subtree printed by MemoryContextStats().
For example, suppose we have three contexts beneath TopMemoryContext:
TopMemoryContext (...)
FooContext (...)
BarContext (...)
BazContext (...)
With the patch, these might be printed as:
TopMemoryContext (...)
FooContext (...)
BarContext (...)
BazContext (...)
Assuming that's the parent/child relationship between them, of course.
Obviously this is just for debugging, but I've found it useful while
looking at some memory-related issues. Any comments or objections to
including this in HEAD?
-Neil
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера