forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit80abbeb
committed
Make init_spin_delay() C89 compliant and change stuck spinlock reporting.
The current definition of init_spin_delay (introduced recently in4835458) wasn't C89 compliant. It's not legal to refer to refer tonon-constant expressions, and the ptr argument was one. This, asreported by Tom, lead to a failure on buildfarm animal pademelon.The pointer, especially on system systems with ASLR, isn't super helpfulanyway, though. So instead of making init_spin_delay into an inlinefunction, make s_lock_stuck() report the function name in addition tofile:line and change init_spin_delay() accordingly. While not a directreplacement, the function name is likely more useful anyway (linenumbers are often hard to interpret in third party reports).This also fixes what file/line number is reported for waits vias_lock().As PG_FUNCNAME_MACRO is now used outside of elog.h, move it to c.h.Reported-By: Tom LaneDiscussion: 4369.1460435533@sss.pgh.pa.us1 parent6cead41 commit80abbeb
6 files changed
+29
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4029 | 4029 | | |
4030 | 4030 | | |
4031 | 4031 | | |
4032 | | - | |
| 4032 | + | |
4033 | 4033 | | |
4034 | 4034 | | |
4035 | 4035 | | |
| |||
4055 | 4055 | | |
4056 | 4056 | | |
4057 | 4057 | | |
4058 | | - | |
| 4058 | + | |
4059 | 4059 | | |
4060 | 4060 | | |
4061 | 4061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
| 873 | + | |
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
78 | | - | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
82 | | - | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
| 92 | + | |
91 | 93 | | |
92 | | - | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | | - | |
| 132 | + | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
172 | 183 | | |
173 | 184 | | |
174 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
| 933 | + | |
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
| 986 | + | |
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | | - | |
1004 | 1003 | | |
1005 | 1004 | | |
| 1005 | + | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | | - | |
| 1008 | + | |
| 1009 | + | |
1009 | 1010 | | |
1010 | 1011 | | |
1011 | 1012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 74 | | |
87 | 75 | | |
88 | 76 | | |
| |||
0 commit comments
Comments
(0)