1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

When trace_lwlocks is used, identify individual lwlocks by name.

Naming the individual lwlocks seems like something that may be useful
for other types of debugging, monitoring, or instrumentation output,
but this commit just implements it for the specific case of
trace_lwlocks.

Patch by me, reviewed by Amit Kapila and Kyotaro Horiguchi
This commit is contained in:
Robert Haas
2015-09-11 13:58:28 -04:00
parent a1b2888517
commit aa65de042f
9 changed files with 200 additions and 68 deletions

View File

@ -285,6 +285,22 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
'src/include/utils/fmgroids.h');
}
if (IsNewer(
'src/include/storage/lwlocknames.h', 'src/backend/storage/lmgr/lwlocknames.txt'))
{
print "Generating lwlocknames.c and lwlocknames.h...\n";
chdir('src/backend/storage/lmgr');
system('perl generate-lwlocknames.pl lwlocknames.txt');
chdir('../../../..');
}
if (IsNewer(
'src/include/storage/lwlocknames.h',
'src/backend/storage/lmgr/lwlocknames.h'))
{
copyFile('src/backend/storage/lmgr/lwlocknames.h',
'src/include/storage/lwlocknames.h');
}
if (IsNewer('src/include/utils/probes.h', 'src/backend/utils/probes.d'))
{
print "Generating probes.h...\n";