eFrom: "Andres Freund" <and...@2ndquadrant.com>
could you try if you get more readable dumps by using disassemble/m?
That might at least print line numbers if you have debug info installed.
Please find the attached file. I hope this will reveal something.
Regards
MauMau
Dump of assembler code for function LWLockRelease:
0x0000000000647d40 <+0>: push %r12
0x0000000000647d42 <+2>: mov %edi,%r12d
0x0000000000647d45 <+5>: shl $0x5,%r12
0x0000000000647d49 <+9>: add 0x4f3a98(%rip),%r12 # 0xb3b7e8
<LWLockArray>
0x0000000000647d50 <+16>: push %rbp
0x0000000000647d51 <+17>: mov %edi,%ebp
0x0000000000647d53 <+19>: push %rbx
0x0000000000647d54 <+20>: mov 0x4f3a86(%rip),%ebx # 0xb3b7e0
<num_held_lwlocks>
0x0000000000647d5a <+26>: nopw 0x0(%rax,%rax,1)
0x0000000000647d60 <+32>: sub $0x1,%ebx
0x0000000000647d63 <+35>: js 0x647ea4 <LWLockRelease+356>
0x0000000000647d69 <+41>: movslq %ebx,%rax
0x0000000000647d6c <+44>: cmp %ebp,0xb3b800(,%rax,4)
0x0000000000647d73 <+51>: jne 0x647d60 <LWLockRelease+32>
0x0000000000647d75 <+53>: mov 0x4f3a65(%rip),%esi # 0xb3b7e0
<num_held_lwlocks>
0x0000000000647d7b <+59>: sub $0x1,%esi
0x0000000000647d7e <+62>: cmp %ebx,%esi
0x0000000000647d80 <+64>: mov %esi,0x4f3a5a(%rip) # 0xb3b7e0
<num_held_lwlocks>
0x0000000000647d86 <+70>: jg 0x647d92 <LWLockRelease+82>
0x0000000000647d88 <+72>: jmp 0x647dad <LWLockRelease+109>
0x0000000000647d8a <+74>: nopw 0x0(%rax,%rax,1)
0x0000000000647d90 <+80>: mov %ecx,%ebx
0x0000000000647d92 <+82>: lea 0x1(%rbx),%ecx
0x0000000000647d95 <+85>: movslq %ebx,%rax
0x0000000000647d98 <+88>: movslq %ecx,%rdx
0x0000000000647d9b <+91>: cmp %ecx,%esi
0x0000000000647d9d <+93>: mov 0xb3b800(,%rdx,4),%edx
0x0000000000647da4 <+100>: mov %edx,0xb3b800(,%rax,4)
0x0000000000647dab <+107>: jg 0x647d90 <LWLockRelease+80>
0x0000000000647dad <+109>: mov $0x1,%eax
0x0000000000647db2 <+114>: lock xchg %al,(%r12)
0x0000000000647db7 <+119>: test %al,%al
0x0000000000647db9 <+121>: jne 0x647ee4 <LWLockRelease+420>
0x0000000000647dbf <+127>: movzbl 0x2(%r12),%eax
0x0000000000647dc5 <+133>: test %al,%al
0x0000000000647dc7 <+135>: jle 0x647f04 <LWLockRelease+452>
0x0000000000647dcd <+141>: movzbl 0x2(%r12),%eax
0x0000000000647dd3 <+147>: sub $0x1,%eax
0x0000000000647dd6 <+150>: mov %al,0x2(%r12)
0x0000000000647ddb <+155>: mov 0x8(%r12),%rcx
0x0000000000647de0 <+160>: test %rcx,%rcx
0x0000000000647de3 <+163>: je 0x647def <LWLockRelease+175>
0x0000000000647de5 <+165>: movzbl 0x2(%r12),%eax
0x0000000000647deb <+171>: test %al,%al
0x0000000000647ded <+173>: je 0x647e08 <LWLockRelease+200>
0x0000000000647def <+175>: movb $0x0,(%r12)
0x0000000000647df4 <+180>: pop %rbx
0x0000000000647df5 <+181>: pop %rbp
0x0000000000647df6 <+182>: mov 0x53d25c(%rip),%eax # 0xb85058
<InterruptHoldoffCount>
0x0000000000647dfc <+188>: pop %r12
0x0000000000647dfe <+190>: sub $0x1,%eax
0x0000000000647e01 <+193>: mov %eax,0x53d251(%rip) # 0xb85058
<InterruptHoldoffCount>
0x0000000000647e07 <+199>: retq
0x0000000000647e08 <+200>: mov 0x4(%r12),%eax
0x0000000000647e0d <+205>: test %eax,%eax
0x0000000000647e0f <+207>: jne 0x647def <LWLockRelease+175>
0x0000000000647e11 <+209>: movzbl 0x1(%r12),%eax
0x0000000000647e17 <+215>: test %al,%al
0x0000000000647e19 <+217>: je 0x647def <LWLockRelease+175>
0x0000000000647e1b <+219>: cmpb $0x2,0x42(%rcx)
0x0000000000647e1f <+223>: jne 0x647f66 <LWLockRelease+550>
0x0000000000647e25 <+229>: mov 0x48(%rcx),%rax
0x0000000000647e29 <+233>: test %rax,%rax
0x0000000000647e2c <+236>: je 0x647f66 <LWLockRelease+550>
0x0000000000647e32 <+242>: mov %rax,%rdx
0x0000000000647e35 <+245>: jmp 0x647e44 <LWLockRelease+260>
0x0000000000647e37 <+247>: mov 0x48(%rdx),%rdx
0x0000000000647e3b <+251>: test %rdx,%rdx
0x0000000000647e3e <+254>: je 0x647f16 <LWLockRelease+470>
0x0000000000647e44 <+260>: movzbl 0x42(%rdx),%esi
0x0000000000647e48 <+264>: mov %rdx,%rax
0x0000000000647e4b <+267>: cmp $0x2,%sil
0x0000000000647e4f <+271>: je 0x647e37 <LWLockRelease+247>
0x0000000000647e51 <+273>: mov 0x48(%rdx),%rdx
0x0000000000647e55 <+277>: test %sil,%sil
0x0000000000647e58 <+280>: je 0x647f16 <LWLockRelease+470>
0x0000000000647e5e <+286>: test %rdx,%rdx
0x0000000000647e61 <+289>: je 0x647f16 <LWLockRelease+470>
0x0000000000647e67 <+295>: cmpb $0x0,0x42(%rdx)
0x0000000000647e6b <+299>: mov $0x1,%edi
0x0000000000647e70 <+304>: jne 0x647e8a <LWLockRelease+330>
0x0000000000647e72 <+306>: jmpq 0x647f16 <LWLockRelease+470>
0x0000000000647e77 <+311>: cmpb $0x0,0x42(%rdx)
0x0000000000647e7b <+315>: nopl 0x0(%rax,%rax,1)
0x0000000000647e80 <+320>: je 0x647f1b <LWLockRelease+475>
0x0000000000647e86 <+326>: movzbl 0x42(%rax),%esi
0x0000000000647e8a <+330>: cmp $0x2,%sil
0x0000000000647e8e <+334>: mov $0x0,%eax
0x0000000000647e93 <+339>: cmovne %eax,%edi
0x0000000000647e96 <+342>: mov %rdx,%rax
0x0000000000647e99 <+345>: mov 0x48(%rdx),%rdx
0x0000000000647e9d <+349>: test %rdx,%rdx
0x0000000000647ea0 <+352>: jne 0x647e77 <LWLockRelease+311>
0x0000000000647ea2 <+354>: jmp 0x647f1b <LWLockRelease+475>
0x0000000000647ea4 <+356>: xor %r8d,%r8d
0x0000000000647ea7 <+359>: mov $0x86fdb0,%ecx
0x0000000000647eac <+364>: mov $0x2e5,%edx
0x0000000000647eb1 <+369>: mov $0x86fd35,%esi
0x0000000000647eb6 <+374>: mov $0x14,%edi
0x0000000000647ebb <+379>: callq 0x71d240 <errstart>
0x0000000000647ec0 <+384>: test %al,%al
0x0000000000647ec2 <+386>: je 0x647d75 <LWLockRelease+53>
0x0000000000647ec8 <+392>: mov %ebp,%esi
0x0000000000647eca <+394>: mov $0x86fd3e,%edi
0x0000000000647ecf <+399>: xor %eax,%eax
0x0000000000647ed1 <+401>: callq 0x71ee30 <errmsg>
0x0000000000647ed6 <+406>: mov %eax,%edi
0x0000000000647ed8 <+408>: xor %eax,%eax
0x0000000000647eda <+410>: callq 0x71cf60 <errfinish>
0x0000000000647edf <+415>: jmpq 0x647d75 <LWLockRelease+53>
0x0000000000647ee4 <+420>: mov $0x2eb,%edx
0x0000000000647ee9 <+425>: mov $0x86fd35,%esi
0x0000000000647eee <+430>: mov %r12,%rdi
0x0000000000647ef1 <+433>: callq 0x648670 <s_lock>
0x0000000000647ef6 <+438>: movzbl 0x2(%r12),%eax
0x0000000000647efc <+444>: test %al,%al
0x0000000000647efe <+446>: jg 0x647dcd <LWLockRelease+141>
0x0000000000647f04 <+452>: mov 0x4(%r12),%eax
0x0000000000647f09 <+457>: sub $0x1,%eax
0x0000000000647f0c <+460>: mov %eax,0x4(%r12)
0x0000000000647f11 <+465>: jmpq 0x647ddb <LWLockRelease+155>
0x0000000000647f16 <+470>: mov $0x1,%edi
0x0000000000647f1b <+475>: mov %rdx,0x8(%r12)
0x0000000000647f20 <+480>: cmpb $0x2,0x42(%rax)
0x0000000000647f24 <+484>: movq $0x0,0x48(%rax)
0x0000000000647f2c <+492>: mov $0x0,%eax
0x0000000000647f31 <+497>: cmovne %eax,%edi
0x0000000000647f34 <+500>: mov %dil,0x1(%r12)
0x0000000000647f39 <+505>: movb $0x0,(%r12)
0x0000000000647f3e <+510>: jmp 0x647f43 <LWLockRelease+515>
0x0000000000647f40 <+512>: mov %rbx,%rcx
0x0000000000647f43 <+515>: mov 0x48(%rcx),%rbx
0x0000000000647f47 <+519>: lea 0x10(%rcx),%rdi
0x0000000000647f4b <+523>: movq $0x0,0x48(%rcx)
0x0000000000647f53 <+531>: movb $0x0,0x41(%rcx)
0x0000000000647f57 <+535>: callq 0x606210 <PGSemaphoreUnlock>
0x0000000000647f5c <+540>: test %rbx,%rbx
0x0000000000647f5f <+543>: jne 0x647f40 <LWLockRelease+512>
0x0000000000647f61 <+545>: jmpq 0x647df4 <LWLockRelease+180>
0x0000000000647f66 <+550>: movzbl 0x42(%rcx),%esi
0x0000000000647f6a <+554>: mov 0x48(%rcx),%rdx
0x0000000000647f6e <+558>: mov %rcx,%rax
0x0000000000647f71 <+561>: jmpq 0x647e55 <LWLockRelease+277>
End of assembler dump.
Dump of assembler code for function LWLockAcquire:
0x0000000000647fc0 <+0>: push %r15
0x0000000000647fc2 <+2>: push %r14
0x0000000000647fc4 <+4>: push %r13
0x0000000000647fc6 <+6>: mov %esi,%r13d
0x0000000000647fc9 <+9>: push %r12
0x0000000000647fcb <+11>: push %rbp
0x0000000000647fcc <+12>: push %rbx
0x0000000000647fcd <+13>: mov %edi,%ebx
0x0000000000647fcf <+15>: shl $0x5,%rbx
0x0000000000647fd3 <+19>: sub $0x8,%rsp
0x0000000000647fd7 <+23>: add 0x4f380a(%rip),%rbx # 0xb3b7e8
<LWLockArray>
0x0000000000647fde <+30>: cmpl $0x63,0x4f37fb(%rip) # 0xb3b7e0
<num_held_lwlocks>
0x0000000000647fe5 <+37>: mov %edi,0x4(%rsp)
0x0000000000647fe9 <+41>: mov 0x4f3708(%rip),%rbp # 0xb3b6f8
<MyProc>
0x0000000000647ff0 <+48>: jg 0x648166 <LWLockAcquire+422>
0x0000000000647ff6 <+54>: mov 0x53d05c(%rip),%eax # 0xb85058
<InterruptHoldoffCount>
0x0000000000647ffc <+60>: lea 0x10(%rbp),%r14
0x0000000000648000 <+64>: xor %r12d,%r12d
0x0000000000648003 <+67>: xor %r15d,%r15d
0x0000000000648006 <+70>: add $0x1,%eax
0x0000000000648009 <+73>: mov %eax,0x53d049(%rip) # 0xb85058
<InterruptHoldoffCount>
0x000000000064800f <+79>: jmp 0x648073 <LWLockAcquire+179>
0x0000000000648011 <+81>: movzbl 0x2(%rbx),%eax
0x0000000000648015 <+85>: test %al,%al
0x0000000000648017 <+87>: jne 0x648024 <LWLockAcquire+100>
0x0000000000648019 <+89>: mov 0x4(%rbx),%eax
0x000000000064801c <+92>: test %eax,%eax
0x000000000064801e <+94>: je 0x648157 <LWLockAcquire+407>
0x0000000000648024 <+100>: test %rbp,%rbp
0x0000000000648027 <+103>: je 0x648119 <LWLockAcquire+345>
0x000000000064802d <+109>: movb $0x1,0x41(%rbp)
0x0000000000648031 <+113>: mov %r13b,0x42(%rbp)
0x0000000000648035 <+117>: movq $0x0,0x48(%rbp)
0x000000000064803d <+125>: mov 0x8(%rbx),%rax
0x0000000000648041 <+129>: test %rax,%rax
0x0000000000648044 <+132>: je 0x648107 <LWLockAcquire+327>
0x000000000064804a <+138>: mov 0x10(%rbx),%rax
0x000000000064804e <+142>: mov %rbp,0x48(%rax)
0x0000000000648052 <+146>: mov %rbp,0x10(%rbx)
0x0000000000648056 <+150>: movb $0x0,(%rbx)
0x0000000000648059 <+153>: xor %esi,%esi
0x000000000064805b <+155>: mov %r14,%rdi
0x000000000064805e <+158>: callq 0x6062a0 <PGSemaphoreLock>
0x0000000000648063 <+163>: cmpb $0x0,0x41(%rbp)
0x0000000000648067 <+167>: jne 0x648110 <LWLockAcquire+336>
0x000000000064806d <+173>: mov $0x1,%r12d
0x0000000000648073 <+179>: mov $0x1,%eax
0x0000000000648078 <+184>: lock xchg %al,(%rbx)
0x000000000064807b <+187>: test %al,%al
0x000000000064807d <+189>: jne 0x6480f0 <LWLockAcquire+304>
0x000000000064807f <+191>: test %r12b,%r12b
0x0000000000648082 <+194>: je 0x648088 <LWLockAcquire+200>
0x0000000000648084 <+196>: movb $0x1,0x1(%rbx)
0x0000000000648088 <+200>: test %r13d,%r13d
0x000000000064808b <+203>: je 0x648011 <LWLockAcquire+81>
0x000000000064808d <+205>: movzbl 0x2(%rbx),%eax
0x0000000000648091 <+209>: test %al,%al
0x0000000000648093 <+211>: jne 0x648024 <LWLockAcquire+100>
0x0000000000648095 <+213>: mov 0x4(%rbx),%eax
0x0000000000648098 <+216>: add $0x1,%eax
0x000000000064809b <+219>: mov %eax,0x4(%rbx)
0x000000000064809e <+222>: movb $0x0,(%rbx)
0x00000000006480a1 <+225>: mov 0x4f3739(%rip),%eax # 0xb3b7e0
<num_held_lwlocks>
0x00000000006480a7 <+231>: xor %ebx,%ebx
0x00000000006480a9 <+233>: mov 0x4(%rsp),%ecx
0x00000000006480ad <+237>: add $0x10,%rbp
0x00000000006480b1 <+241>: movslq %eax,%rdx
0x00000000006480b4 <+244>: add $0x1,%eax
0x00000000006480b7 <+247>: test %r15d,%r15d
0x00000000006480ba <+250>: mov %ecx,0xb3b800(,%rdx,4)
0x00000000006480c1 <+257>: mov %eax,0x4f3719(%rip) # 0xb3b7e0
<num_held_lwlocks>
0x00000000006480c7 <+263>: jle 0x6480e0 <LWLockAcquire+288>
0x00000000006480c9 <+265>: nopl 0x0(%rax)
0x00000000006480d0 <+272>: mov %rbp,%rdi
0x00000000006480d3 <+275>: add $0x1,%ebx
0x00000000006480d6 <+278>: callq 0x606210 <PGSemaphoreUnlock>
0x00000000006480db <+283>: cmp %r15d,%ebx
0x00000000006480de <+286>: jne 0x6480d0 <LWLockAcquire+272>
0x00000000006480e0 <+288>: add $0x8,%rsp
0x00000000006480e4 <+292>: pop %rbx
0x00000000006480e5 <+293>: pop %rbp
0x00000000006480e6 <+294>: pop %r12
0x00000000006480e8 <+296>: pop %r13
0x00000000006480ea <+298>: pop %r14
0x00000000006480ec <+300>: pop %r15
0x00000000006480ee <+302>: retq
0x00000000006480ef <+303>: nop
0x00000000006480f0 <+304>: mov $0x18e,%edx
0x00000000006480f5 <+309>: mov $0x86fd35,%esi
0x00000000006480fa <+314>: mov %rbx,%rdi
0x00000000006480fd <+317>: callq 0x648670 <s_lock>
0x0000000000648102 <+322>: jmpq 0x64807f <LWLockAcquire+191>
0x0000000000648107 <+327>: mov %rbp,0x8(%rbx)
0x000000000064810b <+331>: jmpq 0x648052 <LWLockAcquire+146>
0x0000000000648110 <+336>: add $0x1,%r15d
0x0000000000648114 <+340>: jmpq 0x648059 <LWLockAcquire+153>
0x0000000000648119 <+345>: xor %r8d,%r8d
0x000000000064811c <+348>: mov $0x86fdf9,%ecx
0x0000000000648121 <+353>: mov $0x1b5,%edx
0x0000000000648126 <+358>: mov $0x86fd35,%esi
0x000000000064812b <+363>: mov $0x16,%edi
0x0000000000648130 <+368>: callq 0x71d240 <errstart>
0x0000000000648135 <+373>: test %al,%al
0x0000000000648137 <+375>: je 0x64802d <LWLockAcquire+109>
0x000000000064813d <+381>: mov $0x86fd88,%edi
0x0000000000648142 <+386>: xor %eax,%eax
0x0000000000648144 <+388>: callq 0x71ee30 <errmsg>
0x0000000000648149 <+393>: mov %eax,%edi
0x000000000064814b <+395>: xor %eax,%eax
0x000000000064814d <+397>: callq 0x71cf60 <errfinish>
0x0000000000648152 <+402>: jmpq 0x64802d <LWLockAcquire+109>
0x0000000000648157 <+407>: movzbl 0x2(%rbx),%eax
0x000000000064815b <+411>: add $0x1,%eax
0x000000000064815e <+414>: mov %al,0x2(%rbx)
0x0000000000648161 <+417>: jmpq 0x64809e <LWLockAcquire+222>
0x0000000000648166 <+422>: xor %r8d,%r8d
0x0000000000648169 <+425>: mov $0x86fdf9,%ecx
0x000000000064816e <+430>: mov $0x170,%edx
0x0000000000648173 <+435>: mov $0x86fd35,%esi
0x0000000000648178 <+440>: mov $0x14,%edi
0x000000000064817d <+445>: callq 0x71d240 <errstart>
0x0000000000648182 <+450>: test %al,%al
0x0000000000648184 <+452>: je 0x647ff6 <LWLockAcquire+54>
0x000000000064818a <+458>: mov $0x86fd52,%edi
0x000000000064818f <+463>: xor %eax,%eax
0x0000000000648191 <+465>: callq 0x71ee30 <errmsg>
0x0000000000648196 <+470>: mov %eax,%edi
0x0000000000648198 <+472>: xor %eax,%eax
0x000000000064819a <+474>: callq 0x71cf60 <errfinish>
0x000000000064819f <+479>: jmpq 0x647ff6 <LWLockAcquire+54>
End of assembler dump.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers