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:
@ -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";
|
||||
|
Reference in New Issue
Block a user