mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Add more temporary code to record stack usage at server process exit.
After a look at preliminary results from commit 88cf37d2a8,
I realized it'd be a good idea to spew out the maximum depth measurement
seen by check_stack_depth. So add some quick-n-dirty code to do that.
Like the previous commit, this will be reverted once we've gathered
a set of buildfarm runs with it.
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
#include "storage/ipc.h"
|
||||
#include "tcop/tcopprot.h"
|
||||
|
||||
extern long max_measured_stack_depth;
|
||||
extern long max_measured_register_stack_depth;
|
||||
|
||||
|
||||
/*
|
||||
* This flag is set during proc_exit() to change ereport()'s behavior,
|
||||
@@ -121,6 +124,15 @@ report_stack_size(void)
|
||||
(int) getpid());
|
||||
(void) system(sysbuf);
|
||||
#endif
|
||||
|
||||
#if defined(__ia64__) || defined(__ia64)
|
||||
fprintf(stderr, "max measured stack depths %ldkB, %ldkB\n",
|
||||
(max_measured_stack_depth + 1023) / 1024,
|
||||
(max_measured_register_stack_depth + 1023) / 1024);
|
||||
#else
|
||||
fprintf(stderr, "max measured stack depth %ldkB\n",
|
||||
(max_measured_stack_depth + 1023) / 1024);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user