diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-07-08 16:38:22 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-07-08 16:38:22 -0400 |
commit | ea9c4a16d5ad88a1d28d43ef458e3209b53eb106 (patch) | |
tree | b4fb2d00741e2aef2a1e668b1a9527b20ab7c2c0 /src/backend/storage/ipc/ipc.c | |
parent | 769159fd393f006f29879a71a5f2b3049251b4d9 (diff) |
Add more temporary code to record stack usage at server process exit.
After a look at preliminary results from commit 88cf37d2a86d5b66,
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.
Diffstat (limited to 'src/backend/storage/ipc/ipc.c')
-rw-r--r-- | src/backend/storage/ipc/ipc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index b71d10ea8f4..1b349e12db0 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -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 } |