From aa65de042f5828968f2f6cd65f45c543a40cc3e6 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Fri, 11 Sep 2015 13:58:28 -0400 Subject: 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 --- src/tools/msvc/Solution.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/tools') diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 6b16e69b69..1564b72809 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -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"; -- cgit v1.2.3