unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
@ 2020-05-11 20:47 Kévin Le Gouguec
  2020-06-09 22:24 ` Andrea Corallo
  0 siblings, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2020-05-11 20:47 UTC (permalink / raw)
  To: 41194

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

As detailed in bug#41077, I compiled the feature/native-comp branch[1]
on a low-end-ish laptop[2], blacklisting char-fold.el since native
compilation took too much memory for this file.

As reported there, I get appreciable speedups on the benchmarks
distributed in the elisp-benchmarks ELPA package, except for one
specific test: fibn.  When native-compiled (with any value of
comp-speed), this test makes Emacs abort with the message:

> Memory exhausted--use C-x s then exit and restart Emacs

I've plotted some graphs showing fibn's memory consumption for every
value of comp-speed, as well as for emacs master[3] (where all 3
iterations run to completion):


[-- Attachment #2: fibn.pdf --]
[-- Type: application/pdf, Size: 81262 bytes --]

[-- Attachment #3: Type: text/plain, Size: 716 bytes --]


See [4] for the methodology, source material and logs.  Out of curiosity
I've disassembled the compiled functions in fibn.el for comp-speed 2;
I'm not fluent enough in assembly to spot anything obviously wrong[5].


Let me know if there are things you would like me to try out in order to
investigate this.  


[1] Commit 92cf4bb8cc3da81f4877a734b9e9089ac4b89e85.

[2] Samsung NC10, 2GB RAM, 2GB HDD swap, on Debian Buster.

[3] Commit 9d8fc3a598090da518fcdd5c0503ed0f7faa41a9.

[4] .eln files compiled with:

    (dotimes (i 4) (rename-file (let ((comp-speed i)) (native-compile "fibn.el"))
                                (format "fibn-%d.eln" i)))

    Script used to collect measurements on branch native-comp:

[-- Attachment #4: repro.sh --]
[-- Type: application/x-shellscript, Size: 690 bytes --]

[-- Attachment #5: Type: text/plain, Size: 59 bytes --]


    Script used to collect measurements on branch master:

[-- Attachment #6: master.sh --]
[-- Type: application/x-shellscript, Size: 469 bytes --]

[-- Attachment #7: Type: text/plain, Size: 37 bytes --]


    Script used to plot the graphs:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: plot.py --]
[-- Type: text/x-python, Size: 2291 bytes --]

#!/usr/bin/env python3

from datetime import datetime, timedelta
from pathlib import Path
import re

import matplotlib
from matplotlib import pyplot
from matplotlib.ticker import EngFormatter


MONITOR_RE = re.compile('\n'.join((
    '(?P<time>.+)',
    r' *(?P<seconds>\d+) +(?P<vsz>\d+) +(?P<rss>\d+) +(?P<args>.+)',
    ' *(?P<memheader>.+)',
    'Mem: *(?P<memvalues>.+)',
    'Swap: *(?P<swapvalues>.+)',
    ''
)), flags=re.MULTILINE)


def list_snapshots(monitor_log):
    snapshots = []

    for match in MONITOR_RE.finditer(monitor_log):
        md = match.groupdict()

        memkeys = md['memheader'].split()
        memvalues = md['memvalues'].split()
        swapvalues = md['swapvalues'].split()

        snapshot = {
            'time': datetime.strptime(md['time'], '%Y-%m-%d-%H:%M:%S'),
            'uptime': int(md['seconds']),
            'vsz': int(md['vsz'])*1024,
            'rss': int(md['rss'])*1024,
            'process': md['args'],
            'mem': {memkeys[i]: int(val)*1024 for i, val in enumerate(memvalues)},
            'swap': {memkeys[i]: int(val)*1024 for i, val in enumerate(swapvalues)}
        }

        snapshots.append(snapshot)

    return snapshots


def graph_logs(f, title):
    snapshots = list_snapshots(Path(f).read_text())

    x0 = snapshots[0]['time']
    xs = tuple((s['time']-x0).seconds for s in snapshots)
    vsz = tuple(s['vsz'] for s in snapshots)
    rss = tuple(s['rss'] for s in snapshots)
    memavail = tuple(s['mem']['available'] for s in snapshots)
    swapused = tuple(s['swap']['used'] for s in snapshots)

    fig, axes = pyplot.subplots()
    axes.plot(xs, vsz, label='VSZ (process)')
    axes.plot(xs, rss, label='RSS (process)')
    axes.plot(xs, memavail, label='available memory (system)', linewidth=0.5)
    axes.plot(xs, swapused, label='used swap (system)')

    axes.set_xlim(0, (snapshots[-1]['time']-x0).seconds)
    axes.set_xlabel('seconds')
    axes.set_ylim(0)
    axes.yaxis.set_major_formatter(EngFormatter(unit='B'))
    axes.legend()
    axes.set_title(title)

    pyplot.savefig(f.replace('.log', '.pdf'))
    pyplot.show()


matplotlib.use('TkAgg')

for i in range(4):
    graph_logs(f'fibn-{i}.log', f'fibn test with comp-speed {i}')

graph_logs('fibn-master.log', 'fibn test with emacs master')

[-- Attachment #9: Type: text/plain, Size: 19 bytes --]


    Measurements:

[-- Attachment #10: measurements.tgz --]
[-- Type: application/x-compressed-tar, Size: 18291 bytes --]

[-- Attachment #11: Type: text/plain, Size: 27 bytes --]


    Logs for native-comp:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #12: repro.log --]
[-- Type: text/x-log, Size: 5050 bytes --]

+ elisp_benchmarks=/home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el
+ gccemacs=/home/peniblec/Downloads/sources/emacs-meta/feature/native-comp/src/emacs
+ for i in {0..3}
+ sudo swapoff -a
+ sudo swapon -a
++ dirname /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el
+ cd /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks
+ ln -sf fibn-0.eln fibn.eln
+ out=fibn-0.log
+ set +x
+ /home/peniblec/Downloads/sources/emacs-meta/feature/native-comp/src/emacs -Q -batch -l /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el -eval '(elisp-benchmarks-run "fibn\\.")'
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble-no-cons...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-rec...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn (native compiled elisp)...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/inclist...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/listlen-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/pidigits...
Iteration number: 1
Running fibn...
Memory exhausted--use C-x s then exit and restart Emacs
+ for i in {0..3}
+ sudo swapoff -a
+ sudo swapon -a
++ dirname /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el
+ cd /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks
+ ln -sf fibn-1.eln fibn.eln
+ out=fibn-1.log
+ set +x
+ /home/peniblec/Downloads/sources/emacs-meta/feature/native-comp/src/emacs -Q -batch -l /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el -eval '(elisp-benchmarks-run "fibn\\.")'
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble-no-cons...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-rec...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn (native compiled elisp)...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/inclist...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/listlen-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/pidigits...
Iteration number: 1
Running fibn...
Memory exhausted--use C-x s then exit and restart Emacs
+ for i in {0..3}
+ sudo swapoff -a
+ sudo swapon -a
++ dirname /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el
+ cd /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks
+ ln -sf fibn-2.eln fibn.eln
+ out=fibn-2.log
+ set +x
+ /home/peniblec/Downloads/sources/emacs-meta/feature/native-comp/src/emacs -Q -batch -l /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el -eval '(elisp-benchmarks-run "fibn\\.")'
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble-no-cons...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-rec...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn (native compiled elisp)...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/inclist...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/listlen-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/pidigits...
Iteration number: 1
Running fibn...
Memory exhausted--use C-x s then exit and restart Emacs
+ for i in {0..3}
+ sudo swapoff -a
+ sudo swapon -a
++ dirname /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el
+ cd /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks
+ ln -sf fibn-3.eln fibn.eln
+ out=fibn-3.log
+ set +x
+ /home/peniblec/Downloads/sources/emacs-meta/feature/native-comp/src/emacs -Q -batch -l /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el -eval '(elisp-benchmarks-run "fibn\\.")'
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble-no-cons...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-rec...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn (native compiled elisp)...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/inclist...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/listlen-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/pidigits...
Iteration number: 1
Running fibn...
Memory exhausted--use C-x s then exit and restart Emacs

[-- Attachment #13: Type: text/plain, Size: 22 bytes --]


    Logs for master:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #14: master.log --]
[-- Type: text/x-log, Size: 1575 bytes --]

+ elisp_benchmarks=/home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el
+ emacs=/home/peniblec/Downloads/sources/emacs/src/emacs
+ sudo swapoff -a
+ sudo swapon -a
+ out=fibn-master.log
+ set +x
+ /home/peniblec/Downloads/sources/emacs/src/emacs -Q -batch -l /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/elisp-benchmarks.el -eval '(elisp-benchmarks-run "fibn\\.")'
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble-no-cons...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/bubble...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-rec...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/fibn...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/inclist...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/listlen-tc...
Loading /home/peniblec/.emacs.d/elpa/elisp-benchmarks-1.1/benchmarks/pidigits...
Iteration number: 1
Running fibn...
Iteration number: 2
Running fibn...
Iteration number: 3
Running fibn...
* Results

  | test  | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) |
  |-------+----------------+------------+---------+-------------+-----------------|
  | fibn  |         283.13 |     247.25 |    4425 |      530.37 |            3.03 |
  |-------+----------------+------------+---------+-------------+-----------------|
  | total |         283.13 |     247.25 |    4425 |      530.37 |            3.03 |


[-- Attachment #15: Type: text/plain, Size: 5 bytes --]


[5]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #16: elb-fibn.s --]
[-- Type: text/x-asm, Size: 4813 bytes --]

000015e0 <F656c622d6669626e_elb_fibn_0>:
    15e0:	e8 f7 01 00 00       	call   17dc <__x86.get_pc_thunk.ax>
    15e5:	05 1b 2a 00 00       	add    $0x2a1b,%eax
    15ea:	55                   	push   %ebp
    15eb:	57                   	push   %edi
    15ec:	56                   	push   %esi
    15ed:	53                   	push   %ebx
    15ee:	83 ec 4c             	sub    $0x4c,%esp
    15f1:	8b 88 f4 ff ff ff    	mov    -0xc(%eax),%ecx
    15f7:	8b a8 f8 ff ff ff    	mov    -0x8(%eax),%ebp
    15fd:	8d 44 24 20          	lea    0x20(%esp),%eax
    1601:	89 4c 24 1c          	mov    %ecx,0x1c(%esp)
    1605:	8b 09                	mov    (%ecx),%ecx
    1607:	89 44 24 18          	mov    %eax,0x18(%esp)
    160b:	8d 44 24 38          	lea    0x38(%esp),%eax
    160f:	89 4c 24 04          	mov    %ecx,0x4(%esp)
    1613:	89 4c 24 14          	mov    %ecx,0x14(%esp)
    1617:	89 44 24 10          	mov    %eax,0x10(%esp)
    161b:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    161f:	90                   	nop
    1620:	8b 44 24 14          	mov    0x14(%esp),%eax
    1624:	83 ec 08             	sub    $0x8,%esp
    1627:	89 44 24 28          	mov    %eax,0x28(%esp)
    162b:	8b 44 24 68          	mov    0x68(%esp),%eax
    162f:	89 44 24 2c          	mov    %eax,0x2c(%esp)
    1633:	8b 45 00             	mov    0x0(%ebp),%eax
    1636:	ff 74 24 20          	pushl  0x20(%esp)
    163a:	6a 02                	push   $0x2
    163c:	ff 90 90 12 00 00    	call   *0x1290(%eax)
    1642:	83 c4 10             	add    $0x10,%esp
    1645:	85 c0                	test   %eax,%eax
    1647:	0f 84 b3 00 00 00    	je     1700 <F656c622d6669626e_elb_fibn_0+0x120>
    164d:	8b 7c 24 1c          	mov    0x1c(%esp),%edi
    1651:	8b 44 24 64          	mov    0x64(%esp),%eax
    1655:	83 ec 08             	sub    $0x8,%esp
    1658:	89 44 24 30          	mov    %eax,0x30(%esp)
    165c:	8b 47 0c             	mov    0xc(%edi),%eax
    165f:	8b 77 08             	mov    0x8(%edi),%esi
    1662:	89 44 24 34          	mov    %eax,0x34(%esp)
    1666:	8d 54 24 30          	lea    0x30(%esp),%edx
    166a:	8b 45 00             	mov    0x0(%ebp),%eax
    166d:	52                   	push   %edx
    166e:	6a 02                	push   $0x2
    1670:	ff 90 78 12 00 00    	call   *0x1278(%eax)
    1676:	8b 1f                	mov    (%edi),%ebx
    1678:	bf 06 00 00 00       	mov    $0x6,%edi
    167d:	89 44 24 18          	mov    %eax,0x18(%esp)
    1681:	83 c4 10             	add    $0x10,%esp
    1684:	8d 44 24 30          	lea    0x30(%esp),%eax
    1688:	89 44 24 0c          	mov    %eax,0xc(%esp)
    168c:	eb 32                	jmp    16c0 <F656c622d6669626e_elb_fibn_0+0xe0>
    168e:	66 90                	xchg   %ax,%ax
    1690:	89 7c 24 3c          	mov    %edi,0x3c(%esp)
    1694:	83 ec 08             	sub    $0x8,%esp
    1697:	8b 45 00             	mov    0x0(%ebp),%eax
    169a:	89 f7                	mov    %esi,%edi
    169c:	89 74 24 40          	mov    %esi,0x40(%esp)
    16a0:	ff 74 24 18          	pushl  0x18(%esp)
    16a4:	6a 02                	push   $0x2
    16a6:	ff 90 7c 12 00 00    	call   *0x127c(%eax)
    16ac:	89 44 24 14          	mov    %eax,0x14(%esp)
    16b0:	89 d8                	mov    %ebx,%eax
    16b2:	e8 89 fa ff ff       	call   1140 <add1.constprop.0>
    16b7:	8b 74 24 14          	mov    0x14(%esp),%esi
    16bb:	83 c4 10             	add    $0x10,%esp
    16be:	89 c3                	mov    %eax,%ebx
    16c0:	8b 44 24 08          	mov    0x8(%esp),%eax
    16c4:	89 5c 24 30          	mov    %ebx,0x30(%esp)
    16c8:	83 ec 08             	sub    $0x8,%esp
    16cb:	89 44 24 3c          	mov    %eax,0x3c(%esp)
    16cf:	8b 45 00             	mov    0x0(%ebp),%eax
    16d2:	ff 74 24 14          	pushl  0x14(%esp)
    16d6:	6a 02                	push   $0x2
    16d8:	ff 90 90 12 00 00    	call   *0x1290(%eax)
    16de:	83 c4 10             	add    $0x10,%esp
    16e1:	85 c0                	test   %eax,%eax
    16e3:	75 ab                	jne    1690 <F656c622d6669626e_elb_fibn_0+0xb0>
    16e5:	8b 44 24 14          	mov    0x14(%esp),%eax
    16e9:	e8 52 fa ff ff       	call   1140 <add1.constprop.0>
    16ee:	89 44 24 14          	mov    %eax,0x14(%esp)
    16f2:	e9 29 ff ff ff       	jmp    1620 <F656c622d6669626e_elb_fibn_0+0x40>
    16f7:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    16fe:	66 90                	xchg   %ax,%ax
    1700:	8b 44 24 04          	mov    0x4(%esp),%eax
    1704:	83 c4 4c             	add    $0x4c,%esp
    1707:	5b                   	pop    %ebx
    1708:	5e                   	pop    %esi
    1709:	5f                   	pop    %edi
    170a:	5d                   	pop    %ebp
    170b:	c3                   	ret    
    170c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #17: elb-fibn-entry.s --]
[-- Type: text/x-asm, Size: 1126 bytes --]

00001710 <F656c622d6669626e2d656e747279_elb_fibn_entry_0>:
    1710:	e8 20 fa ff ff       	call   1135 <__x86.get_pc_thunk.dx>
    1715:	81 c2 eb 28 00 00    	add    $0x28eb,%edx
    171b:	83 ec 24             	sub    $0x24,%esp
    171e:	8b 82 f4 ff ff ff    	mov    -0xc(%edx),%eax
    1724:	8b 48 10             	mov    0x10(%eax),%ecx
    1727:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
    172b:	8b 48 14             	mov    0x14(%eax),%ecx
    172e:	8b 40 18             	mov    0x18(%eax),%eax
    1731:	89 4c 24 10          	mov    %ecx,0x10(%esp)
    1735:	89 44 24 14          	mov    %eax,0x14(%esp)
    1739:	8b 82 f8 ff ff ff    	mov    -0x8(%edx),%eax
    173f:	8d 54 24 0c          	lea    0xc(%esp),%edx
    1743:	8b 00                	mov    (%eax),%eax
    1745:	52                   	push   %edx
    1746:	6a 03                	push   $0x3
    1748:	ff 90 40 0d 00 00    	call   *0xd40(%eax)
    174e:	83 c4 2c             	add    $0x2c,%esp
    1751:	c3                   	ret    
    1752:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    1759:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi


^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-05-11 20:47 bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory Kévin Le Gouguec
@ 2020-06-09 22:24 ` Andrea Corallo
  2020-06-10  7:55   ` Kévin Le Gouguec
  0 siblings, 1 reply; 9+ messages in thread
From: Andrea Corallo @ 2020-06-09 22:24 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 41194

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> As detailed in bug#41077, I compiled the feature/native-comp branch[1]
> on a low-end-ish laptop[2], blacklisting char-fold.el since native
> compilation took too much memory for this file.
>
> As reported there, I get appreciable speedups on the benchmarks
> distributed in the elisp-benchmarks ELPA package, except for one
> specific test: fibn.  When native-compiled (with any value of
> comp-speed), this test makes Emacs abort with the message:
>
>> Memory exhausted--use C-x s then exit and restart Emacs
>
> I've plotted some graphs showing fibn's memory consumption for every
> value of comp-speed, as well as for emacs master[3] (where all 3
> iterations run to completion):
>
>
>
> See [4] for the methodology, source material and logs.  Out of curiosity
> I've disassembled the compiled functions in fibn.el for comp-speed 2;
> I'm not fluent enough in assembly to spot anything obviously wrong[5].
>
>
> Let me know if there are things you would like me to try out in order to
> investigate this.  

Hi Kevin,

sorry for the very late reply I just had a look.

The following is going on: being on 32bit system you get into bignums
end this allocates memory while is looping inside `elb-fibn'.
Unfortunatelly there's no opportunity of passing through maybe_gc to
trigger garbage collection because I've not implemented the equivalent
of what is the quitcounter in the byte interpreter.

I'll come-up with a patch to generate the equivalent code of the
quitcounter when compiling for speed < 3.

Thanks for the feedback

  Andrea

PS FYI I think memory consumption during compilation (as compile time)
should be now considerably lowered (but I've still haven't measured it).

-- 
akrl@sdf.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-06-09 22:24 ` Andrea Corallo
@ 2020-06-10  7:55   ` Kévin Le Gouguec
  2020-06-13 15:00     ` Andrea Corallo
  0 siblings, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2020-06-10  7:55 UTC (permalink / raw)
  To: 41194

Andrea Corallo <akrl@sdf.org> writes:

> sorry for the very late reply I just had a look.

No need to apologize!  You've obviously been busy on other fronts.

> The following is going on: being on 32bit system you get into bignums
> end this allocates memory while is looping inside `elb-fibn'.
> Unfortunatelly there's no opportunity of passing through maybe_gc to
> trigger garbage collection because I've not implemented the equivalent
> of what is the quitcounter in the byte interpreter.
>
> I'll come-up with a patch to generate the equivalent code of the
> quitcounter when compiling for speed < 3.
>
> Thanks for the feedback
>
>   Andrea
>
> PS FYI I think memory consumption during compilation (as compile time)
> should be now considerably lowered (but I've still haven't measured it).

Alright!  I'll keep an eye on your branch and on the bugtracker, and
recompile & run my measurements when I spot your patch.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-06-10  7:55   ` Kévin Le Gouguec
@ 2020-06-13 15:00     ` Andrea Corallo
  2020-06-13 18:17       ` Kévin Le Gouguec
  2020-06-14 15:19       ` Kévin Le Gouguec
  0 siblings, 2 replies; 9+ messages in thread
From: Andrea Corallo @ 2020-06-13 15:00 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 41194

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> Andrea Corallo <akrl@sdf.org> writes:
>
>> sorry for the very late reply I just had a look.
>
> No need to apologize!  You've obviously been busy on other fronts.
>
>> The following is going on: being on 32bit system you get into bignums
>> end this allocates memory while is looping inside `elb-fibn'.
>> Unfortunatelly there's no opportunity of passing through maybe_gc to
>> trigger garbage collection because I've not implemented the equivalent
>> of what is the quitcounter in the byte interpreter.
>>
>> I'll come-up with a patch to generate the equivalent code of the
>> quitcounter when compiling for speed < 3.
>>
>> Thanks for the feedback
>>
>>   Andrea
>>
>> PS FYI I think memory consumption during compilation (as compile time)
>> should be now considerably lowered (but I've still haven't measured it).
>
> Alright!  I'll keep an eye on your branch and on the bugtracker, and
> recompile & run my measurements when I spot your patch.

Hi Kévin,

5a55a845a7 * Implement 'maybe_gc_or_quit' to allow correct GC in compiled Lisp
34ed9d2498 * Introduce latches

are fixing here this issue, now running fibn at speed 2 the memory
consuptions stays constant.

You'll still see the same behavior at speed 3 because there the
programmer is supposedly responsible to add manually possible GC entry
points.

I think now 32bit should be in a much better state but I hadn't time to
test it still.

Thanks!

  Andrea

--
akrl@sdf.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-06-13 15:00     ` Andrea Corallo
@ 2020-06-13 18:17       ` Kévin Le Gouguec
  2020-06-14 15:19       ` Kévin Le Gouguec
  1 sibling, 0 replies; 9+ messages in thread
From: Kévin Le Gouguec @ 2020-06-13 18:17 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 41194

Andrea Corallo <akrl@sdf.org> writes:

> I think now 32bit should be in a much better state but I hadn't time to
> test it still.

Alright!  I've pulled the changes and started recompiling (without
blacklisting char-fold.el, because I'm such an optimist).  I'll followup
when compilation has finished to let you know how it went with fibn!

Thank you for your efforts.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-06-13 15:00     ` Andrea Corallo
  2020-06-13 18:17       ` Kévin Le Gouguec
@ 2020-06-14 15:19       ` Kévin Le Gouguec
  2020-06-14 16:19         ` Andrea Corallo
  1 sibling, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2020-06-14 15:19 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 41194

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

Andrea Corallo <akrl@sdf.org> writes:

> 5a55a845a7 * Implement 'maybe_gc_or_quit' to allow correct GC in compiled Lisp
> 34ed9d2498 * Introduce latches
>
> are fixing here this issue, now running fibn at speed 2 the memory
> consuptions stays constant.

Alright, feedback time!

Commits:
- master: 82a632edc8b80bf16d9b9f205474bf9724b084c0
- feature/native-comp: 5a55a845a7c426e82e8a6a6d02bc4a39992871e3


The Good News
=============

- I can compile the branch without adding files to the default
  blacklist,

- compilation (-j1) now only takes less than 6 hours instead of 3 days
  (compared with 1.5 hour on master),

- at no point during compilation did the system swap; in fact, I could
  probably have risked a -j2 build,

- elisp-benchmarks doesn't show any obvious performance regression
  (… though see Bad News).

For details on memory usage during compilation, see attached memory
profile (to compare with bug#41077#28).


[-- Attachment #2: compilation-memory.pdf --]
[-- Type: application/pdf, Size: 73753 bytes --]

[-- Attachment #3: Type: text/plain, Size: 344 bytes --]


Few files take more than 3 minutes to compile now:

ELC+ELN emacs-lisp/comp.el      0:09:49
ELC+ELN org/org.el              0:03:39
ELC+ELN ../lisp/window.el       0:03:16
ELC+ELN emacs-lisp/bytecomp.el  0:03:16

For details on performance, see attached tables for master and
feature/native-comp, respectively (to compare with bug#41077#40).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: perfs.org --]
[-- Type: text/x-org, Size: 2834 bytes --]

* Results
** master
  | test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) |
  |----------------+----------------+------------+---------+-------------+-----------------|
  | bubble-no-cons |         119.55 |       0.23 |       3 |      119.77 |            0.62 |
  | bubble         |          46.98 |      31.03 |     406 |       78.01 |            0.40 |
  | dhrystone      |          75.05 |       0.00 |       0 |       75.05 |            0.12 |
  | fibn-rec       |          59.89 |       0.00 |       0 |       59.89 |            0.07 |
  | fibn-tc        |         151.21 |      96.27 |    1168 |      247.48 |            0.45 |
  | flet           |         110.56 |       0.00 |       0 |      110.56 |            0.21 |
  | inclist        |         166.63 |       0.00 |       0 |      166.63 |            0.23 |
  | listlen-tc     |          77.43 |       0.00 |       0 |       77.43 |            0.37 |
  | map-closure    |          81.72 |       0.00 |       0 |       81.72 |            0.41 |
  | nbody          |          28.88 |      98.07 |    1291 |      126.95 |            0.22 |
  | pcase          |         111.76 |       0.00 |       0 |      111.76 |            0.14 |
  |----------------+----------------+------------+---------+-------------+-----------------|
  | total          |        1029.64 |     225.60 |    2868 |     1255.24 |            1.12 |
** feature/native-comp
  | test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) |
  |----------------+----------------+------------+---------+-------------+-----------------|
  | bubble-no-cons |          19.44 |       0.10 |       1 |       19.54 |            0.02 |
  | bubble         |          11.35 |       7.63 |       1 |       18.99 |            8.51 |
  | dhrystone      |          31.39 |       0.00 |       0 |       31.39 |            0.10 |
  | fibn-rec       |          19.36 |       0.00 |       0 |       19.36 |            0.03 |
  | fibn-tc        |          87.00 |       6.16 |       1 |       93.16 |            1.61 |
  | flet           |          23.83 |       0.00 |       0 |       23.83 |            0.01 |
  | inclist        |           9.78 |       0.00 |       0 |        9.78 |            0.02 |
  | listlen-tc     |           0.78 |       0.00 |       0 |        0.78 |            0.00 |
  | map-closure    |          81.11 |       0.00 |       0 |       81.11 |            0.06 |
  | nbody          |          15.76 |       1.61 |       1 |       17.38 |            0.03 |
  | pcase          |          12.52 |       0.00 |       0 |       12.52 |            0.02 |
  |----------------+----------------+------------+---------+-------------+-----------------|
  | total          |         312.34 |      15.51 |       4 |      327.84 |            8.67 |


[-- Attachment #5: Type: text/plain, Size: 85 bytes --]



The Bad News
============

- fibn still exhausts memory,
- now pidigits does too.


[-- Attachment #6: fibn.pdf --]
[-- Type: application/pdf, Size: 19089 bytes --]

[-- Attachment #7: pidigits.pdf --]
[-- Type: application/pdf, Size: 17848 bytes --]

[-- Attachment #8: Type: text/plain, Size: 144 bytes --]


I've only tried the default comp-speed (2) so far.  I've attached the
results of M-x disassemble on the functions in fibn.el and pidigits.el.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: elb-eliminate-digit.s --]
[-- Type: text/x-asm, Size: 4237 bytes --]

000013a0 <F656c622d656c696d696e6174652d6469676974_elb_eliminate_digit_0>:
    13a0:	e8 90 06 00 00       	call   1a35 <__x86.get_pc_thunk.ax>
    13a5:	05 5b 2c 00 00       	add    $0x2c5b,%eax
    13aa:	57                   	push   %edi
    13ab:	56                   	push   %esi
    13ac:	53                   	push   %ebx
    13ad:	83 ec 2c             	sub    $0x2c,%esp
    13b0:	8b 98 f8 ff ff ff    	mov    -0x8(%eax),%ebx
    13b6:	8b b0 f4 ff ff ff    	mov    -0xc(%eax),%esi
    13bc:	8b 13                	mov    (%ebx),%edx
    13be:	ff 76 08             	pushl  0x8(%esi)
    13c1:	ff 92 e4 12 00 00    	call   *0x12e4(%edx)
    13c7:	89 44 24 18          	mov    %eax,0x18(%esp)
    13cb:	58                   	pop    %eax
    13cc:	8b 03                	mov    (%ebx),%eax
    13ce:	ff 76 0c             	pushl  0xc(%esi)
    13d1:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    13d7:	89 44 24 10          	mov    %eax,0x10(%esp)
    13db:	8b 44 24 40          	mov    0x40(%esp),%eax
    13df:	89 44 24 14          	mov    %eax,0x14(%esp)
    13e3:	5a                   	pop    %edx
    13e4:	59                   	pop    %ecx
    13e5:	8b 03                	mov    (%ebx),%eax
    13e7:	8d 54 24 08          	lea    0x8(%esp),%edx
    13eb:	52                   	push   %edx
    13ec:	6a 02                	push   $0x2
    13ee:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    13f4:	89 44 24 1c          	mov    %eax,0x1c(%esp)
    13f8:	5f                   	pop    %edi
    13f9:	58                   	pop    %eax
    13fa:	8b 03                	mov    (%ebx),%eax
    13fc:	8d 54 24 10          	lea    0x10(%esp),%edx
    1400:	52                   	push   %edx
    1401:	6a 02                	push   $0x2
    1403:	ff 90 8c 12 00 00    	call   *0x128c(%eax)
    1409:	8b 13                	mov    (%ebx),%edx
    140b:	89 44 24 20          	mov    %eax,0x20(%esp)
    140f:	6a 00                	push   $0x0
    1411:	6a 00                	push   $0x0
    1413:	50                   	push   %eax
    1414:	ff 76 08             	pushl  0x8(%esi)
    1417:	ff 52 24             	call   *0x24(%edx)
    141a:	8b 46 10             	mov    0x10(%esi),%eax
    141d:	89 44 24 34          	mov    %eax,0x34(%esp)
    1421:	83 c4 18             	add    $0x18,%esp
    1424:	8b 03                	mov    (%ebx),%eax
    1426:	8d 54 24 18          	lea    0x18(%esp),%edx
    142a:	52                   	push   %edx
    142b:	6a 02                	push   $0x2
    142d:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    1433:	6a 00                	push   $0x0
    1435:	8b 13                	mov    (%ebx),%edx
    1437:	6a 00                	push   $0x0
    1439:	50                   	push   %eax
    143a:	ff 76 08             	pushl  0x8(%esi)
    143d:	ff 52 24             	call   *0x24(%edx)
    1440:	8b 03                	mov    (%ebx),%eax
    1442:	83 c4 14             	add    $0x14,%esp
    1445:	ff 76 04             	pushl  0x4(%esi)
    1448:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    144e:	89 44 24 28          	mov    %eax,0x28(%esp)
    1452:	8b 46 10             	mov    0x10(%esi),%eax
    1455:	89 44 24 2c          	mov    %eax,0x2c(%esp)
    1459:	58                   	pop    %eax
    145a:	8b 03                	mov    (%ebx),%eax
    145c:	5a                   	pop    %edx
    145d:	8d 54 24 20          	lea    0x20(%esp),%edx
    1461:	52                   	push   %edx
    1462:	6a 02                	push   $0x2
    1464:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    146a:	6a 00                	push   $0x0
    146c:	89 c7                	mov    %eax,%edi
    146e:	6a 00                	push   $0x0
    1470:	8b 03                	mov    (%ebx),%eax
    1472:	57                   	push   %edi
    1473:	ff 76 04             	pushl  0x4(%esi)
    1476:	ff 50 24             	call   *0x24(%eax)
    1479:	89 f8                	mov    %edi,%eax
    147b:	83 c4 40             	add    $0x40,%esp
    147e:	5b                   	pop    %ebx
    147f:	5e                   	pop    %esi
    1480:	5f                   	pop    %edi
    1481:	c3                   	ret    
    1482:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    1489:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #10: elb-extract-digit.s --]
[-- Type: text/x-asm, Size: 2632 bytes --]

00001310 <F656c622d657874726163742d6469676974_elb_extract_digit_0>:
    1310:	e8 20 07 00 00       	call   1a35 <__x86.get_pc_thunk.ax>
    1315:	05 eb 2c 00 00       	add    $0x2ceb,%eax
    131a:	57                   	push   %edi
    131b:	56                   	push   %esi
    131c:	53                   	push   %ebx
    131d:	83 ec 1c             	sub    $0x1c,%esp
    1320:	8b 98 f8 ff ff ff    	mov    -0x8(%eax),%ebx
    1326:	8b b8 f4 ff ff ff    	mov    -0xc(%eax),%edi
    132c:	8b 13                	mov    (%ebx),%edx
    132e:	ff 77 04             	pushl  0x4(%edi)
    1331:	ff 92 e4 12 00 00    	call   *0x12e4(%edx)
    1337:	89 44 24 10          	mov    %eax,0x10(%esp)
    133b:	8b 44 24 30          	mov    0x30(%esp),%eax
    133f:	89 44 24 14          	mov    %eax,0x14(%esp)
    1343:	58                   	pop    %eax
    1344:	5a                   	pop    %edx
    1345:	8b 03                	mov    (%ebx),%eax
    1347:	8d 54 24 08          	lea    0x8(%esp),%edx
    134b:	52                   	push   %edx
    134c:	6a 02                	push   $0x2
    134e:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    1354:	89 44 24 18          	mov    %eax,0x18(%esp)
    1358:	59                   	pop    %ecx
    1359:	8b 03                	mov    (%ebx),%eax
    135b:	ff 77 08             	pushl  0x8(%edi)
    135e:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    1364:	89 44 24 1c          	mov    %eax,0x1c(%esp)
    1368:	5e                   	pop    %esi
    1369:	58                   	pop    %eax
    136a:	8b 03                	mov    (%ebx),%eax
    136c:	8d 54 24 10          	lea    0x10(%esp),%edx
    1370:	52                   	push   %edx
    1371:	6a 02                	push   $0x2
    1373:	ff 90 90 12 00 00    	call   *0x1290(%eax)
    1379:	89 c6                	mov    %eax,%esi
    137b:	58                   	pop    %eax
    137c:	8b 03                	mov    (%ebx),%eax
    137e:	ff 77 0c             	pushl  0xc(%edi)
    1381:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    1387:	89 c2                	mov    %eax,%edx
    1389:	58                   	pop    %eax
    138a:	59                   	pop    %ecx
    138b:	52                   	push   %edx
    138c:	8b 03                	mov    (%ebx),%eax
    138e:	56                   	push   %esi
    138f:	ff 90 a8 0c 00 00    	call   *0xca8(%eax)
    1395:	83 c4 20             	add    $0x20,%esp
    1398:	5b                   	pop    %ebx
    1399:	5e                   	pop    %esi
    139a:	5f                   	pop    %edi
    139b:	c3                   	ret    
    139c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #11: elb-fibn.s --]
[-- Type: text/x-asm, Size: 6689 bytes --]

000012e0 <F656c622d6669626e_elb_fibn_0>:
    12e0:	e8 af 02 00 00       	call   1594 <__x86.get_pc_thunk.ax>
    12e5:	05 1b 2d 00 00       	add    $0x2d1b,%eax
    12ea:	55                   	push   %ebp
    12eb:	57                   	push   %edi
    12ec:	56                   	push   %esi
    12ed:	53                   	push   %ebx
    12ee:	83 ec 4c             	sub    $0x4c,%esp
    12f1:	8b 90 f4 ff ff ff    	mov    -0xc(%eax),%edx
    12f7:	8b a8 f8 ff ff ff    	mov    -0x8(%eax),%ebp
    12fd:	8d 44 24 20          	lea    0x20(%esp),%eax
    1301:	89 54 24 1c          	mov    %edx,0x1c(%esp)
    1305:	8b 12                	mov    (%edx),%edx
    1307:	89 44 24 18          	mov    %eax,0x18(%esp)
    130b:	8d 44 24 38          	lea    0x38(%esp),%eax
    130f:	89 54 24 04          	mov    %edx,0x4(%esp)
    1313:	89 54 24 14          	mov    %edx,0x14(%esp)
    1317:	89 44 24 10          	mov    %eax,0x10(%esp)
    131b:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    131f:	90                   	nop
    1320:	8b 44 24 14          	mov    0x14(%esp),%eax
    1324:	83 ec 08             	sub    $0x8,%esp
    1327:	89 44 24 28          	mov    %eax,0x28(%esp)
    132b:	8b 44 24 68          	mov    0x68(%esp),%eax
    132f:	89 44 24 2c          	mov    %eax,0x2c(%esp)
    1333:	8b 45 00             	mov    0x0(%ebp),%eax
    1336:	ff 74 24 20          	pushl  0x20(%esp)
    133a:	6a 02                	push   $0x2
    133c:	ff 90 a4 12 00 00    	call   *0x12a4(%eax)
    1342:	83 c4 10             	add    $0x10,%esp
    1345:	85 c0                	test   %eax,%eax
    1347:	0f 84 23 01 00 00    	je     1470 <F656c622d6669626e_elb_fibn_0+0x190>
    134d:	8b 7c 24 1c          	mov    0x1c(%esp),%edi
    1351:	8b 44 24 64          	mov    0x64(%esp),%eax
    1355:	83 ec 08             	sub    $0x8,%esp
    1358:	be 06 00 00 00       	mov    $0x6,%esi
    135d:	89 44 24 30          	mov    %eax,0x30(%esp)
    1361:	8b 47 0c             	mov    0xc(%edi),%eax
    1364:	8b 5f 08             	mov    0x8(%edi),%ebx
    1367:	89 44 24 34          	mov    %eax,0x34(%esp)
    136b:	8d 54 24 30          	lea    0x30(%esp),%edx
    136f:	8b 45 00             	mov    0x0(%ebp),%eax
    1372:	52                   	push   %edx
    1373:	6a 02                	push   $0x2
    1375:	ff 90 8c 12 00 00    	call   *0x128c(%eax)
    137b:	8b 3f                	mov    (%edi),%edi
    137d:	89 44 24 18          	mov    %eax,0x18(%esp)
    1381:	83 c4 10             	add    $0x10,%esp
    1384:	8d 44 24 30          	lea    0x30(%esp),%eax
    1388:	89 44 24 0c          	mov    %eax,0xc(%esp)
    138c:	89 f8                	mov    %edi,%eax
    138e:	89 f7                	mov    %esi,%edi
    1390:	89 de                	mov    %ebx,%esi
    1392:	89 c3                	mov    %eax,%ebx
    1394:	eb 23                	jmp    13b9 <F656c622d6669626e_elb_fibn_0+0xd9>
    1396:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    139d:	8d 76 00             	lea    0x0(%esi),%esi
    13a0:	89 d8                	mov    %ebx,%eax
    13a2:	c1 f8 02             	sar    $0x2,%eax
    13a5:	3d ff ff ff 1f       	cmp    $0x1fffffff,%eax
    13aa:	74 5a                	je     1406 <F656c622d6669626e_elb_fibn_0+0x126>
    13ac:	8d 1c 85 06 00 00 00 	lea    0x6(,%eax,4),%ebx
    13b3:	89 f7                	mov    %esi,%edi
    13b5:	8b 74 24 04          	mov    0x4(%esp),%esi
    13b9:	8b 44 24 08          	mov    0x8(%esp),%eax
    13bd:	89 5c 24 30          	mov    %ebx,0x30(%esp)
    13c1:	83 ec 08             	sub    $0x8,%esp
    13c4:	89 44 24 3c          	mov    %eax,0x3c(%esp)
    13c8:	8b 45 00             	mov    0x0(%ebp),%eax
    13cb:	ff 74 24 14          	pushl  0x14(%esp)
    13cf:	6a 02                	push   $0x2
    13d1:	ff 90 a4 12 00 00    	call   *0x12a4(%eax)
    13d7:	83 c4 10             	add    $0x10,%esp
    13da:	85 c0                	test   %eax,%eax
    13dc:	74 42                	je     1420 <F656c622d6669626e_elb_fibn_0+0x140>
    13de:	89 74 24 38          	mov    %esi,0x38(%esp)
    13e2:	83 ec 08             	sub    $0x8,%esp
    13e5:	8b 45 00             	mov    0x0(%ebp),%eax
    13e8:	89 7c 24 44          	mov    %edi,0x44(%esp)
    13ec:	ff 74 24 18          	pushl  0x18(%esp)
    13f0:	6a 02                	push   $0x2
    13f2:	ff 90 90 12 00 00    	call   *0x1290(%eax)
    13f8:	89 44 24 14          	mov    %eax,0x14(%esp)
    13fc:	8d 43 fe             	lea    -0x2(%ebx),%eax
    13ff:	83 c4 10             	add    $0x10,%esp
    1402:	a8 03                	test   $0x3,%al
    1404:	74 9a                	je     13a0 <F656c622d6669626e_elb_fibn_0+0xc0>
    1406:	83 ec 0c             	sub    $0xc,%esp
    1409:	8b 45 00             	mov    0x0(%ebp),%eax
    140c:	53                   	push   %ebx
    140d:	ff 90 5c 12 00 00    	call   *0x125c(%eax)
    1413:	89 c3                	mov    %eax,%ebx
    1415:	83 c4 10             	add    $0x10,%esp
    1418:	eb 99                	jmp    13b3 <F656c622d6669626e_elb_fibn_0+0xd3>
    141a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
    1420:	8b 4c 24 14          	mov    0x14(%esp),%ecx
    1424:	8d 41 fe             	lea    -0x2(%ecx),%eax
    1427:	a8 03                	test   $0x3,%al
    1429:	75 25                	jne    1450 <F656c622d6669626e_elb_fibn_0+0x170>
    142b:	89 c8                	mov    %ecx,%eax
    142d:	c1 f8 02             	sar    $0x2,%eax
    1430:	3d ff ff ff 1f       	cmp    $0x1fffffff,%eax
    1435:	74 19                	je     1450 <F656c622d6669626e_elb_fibn_0+0x170>
    1437:	8d 04 85 06 00 00 00 	lea    0x6(,%eax,4),%eax
    143e:	89 44 24 14          	mov    %eax,0x14(%esp)
    1442:	e9 d9 fe ff ff       	jmp    1320 <F656c622d6669626e_elb_fibn_0+0x40>
    1447:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    144e:	66 90                	xchg   %ax,%ax
    1450:	83 ec 0c             	sub    $0xc,%esp
    1453:	8b 45 00             	mov    0x0(%ebp),%eax
    1456:	ff 74 24 20          	pushl  0x20(%esp)
    145a:	ff 90 5c 12 00 00    	call   *0x125c(%eax)
    1460:	89 44 24 24          	mov    %eax,0x24(%esp)
    1464:	83 c4 10             	add    $0x10,%esp
    1467:	e9 b4 fe ff ff       	jmp    1320 <F656c622d6669626e_elb_fibn_0+0x40>
    146c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    1470:	8b 44 24 04          	mov    0x4(%esp),%eax
    1474:	83 c4 4c             	add    $0x4c,%esp
    1477:	5b                   	pop    %ebx
    1478:	5e                   	pop    %esi
    1479:	5f                   	pop    %edi
    147a:	5d                   	pop    %ebp
    147b:	c3                   	ret    
    147c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #12: elb-fibn-entry.s --]
[-- Type: text/x-asm, Size: 697 bytes --]

00001480 <F656c622d6669626e2d656e747279_elb_fibn_entry_0>:
    1480:	53                   	push   %ebx
    1481:	e8 da fb ff ff       	call   1060 <__x86.get_pc_thunk.bx>
    1486:	81 c3 7a 2b 00 00    	add    $0x2b7a,%ebx
    148c:	83 ec 10             	sub    $0x10,%esp
    148f:	68 42 01 00 00       	push   $0x142
    1494:	68 02 1b b7 00       	push   $0xb71b02
    1499:	e8 92 fb ff ff       	call   1030 <F656c622d6669626e_elb_fibn_0@plt>
    149e:	83 c4 18             	add    $0x18,%esp
    14a1:	5b                   	pop    %ebx
    14a2:	c3                   	ret    
    14a3:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    14aa:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #13: elb-next-term.s --]
[-- Type: text/x-asm, Size: 6624 bytes --]

00001490 <F656c622d6e6578742d7465726d_elb_next_term_0>:
    1490:	e8 a0 05 00 00       	call   1a35 <__x86.get_pc_thunk.ax>
    1495:	05 6b 2b 00 00       	add    $0x2b6b,%eax
    149a:	55                   	push   %ebp
    149b:	57                   	push   %edi
    149c:	56                   	push   %esi
    149d:	53                   	push   %ebx
    149e:	83 ec 44             	sub    $0x44,%esp
    14a1:	8b b0 f4 ff ff ff    	mov    -0xc(%eax),%esi
    14a7:	8b 98 f8 ff ff ff    	mov    -0x8(%eax),%ebx
    14ad:	8b 7c 24 58          	mov    0x58(%esp),%edi
    14b1:	8b 56 14             	mov    0x14(%esi),%edx
    14b4:	8b 03                	mov    (%ebx),%eax
    14b6:	89 7c 24 08          	mov    %edi,0x8(%esp)
    14ba:	89 54 24 0c          	mov    %edx,0xc(%esp)
    14be:	8d 54 24 08          	lea    0x8(%esp),%edx
    14c2:	52                   	push   %edx
    14c3:	6a 02                	push   $0x2
    14c5:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    14cb:	8d 50 fe             	lea    -0x2(%eax),%edx
    14ce:	83 c4 10             	add    $0x10,%esp
    14d1:	83 e2 03             	and    $0x3,%edx
    14d4:	75 1a                	jne    14f0 <F656c622d6e6578742d7465726d_elb_next_term_0+0x60>
    14d6:	89 c2                	mov    %eax,%edx
    14d8:	c1 fa 02             	sar    $0x2,%edx
    14db:	81 fa ff ff ff 1f    	cmp    $0x1fffffff,%edx
    14e1:	74 0d                	je     14f0 <F656c622d6e6578742d7465726d_elb_next_term_0+0x60>
    14e3:	8d 2c 95 06 00 00 00 	lea    0x6(,%edx,4),%ebp
    14ea:	eb 15                	jmp    1501 <F656c622d6e6578742d7465726d_elb_next_term_0+0x71>
    14ec:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    14f0:	83 ec 0c             	sub    $0xc,%esp
    14f3:	8b 13                	mov    (%ebx),%edx
    14f5:	50                   	push   %eax
    14f6:	ff 92 5c 12 00 00    	call   *0x125c(%edx)
    14fc:	89 c5                	mov    %eax,%ebp
    14fe:	83 c4 10             	add    $0x10,%esp
    1501:	83 ec 0c             	sub    $0xc,%esp
    1504:	8b 03                	mov    (%ebx),%eax
    1506:	ff 76 08             	pushl  0x8(%esi)
    1509:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    150f:	89 44 24 20          	mov    %eax,0x20(%esp)
    1513:	58                   	pop    %eax
    1514:	8b 03                	mov    (%ebx),%eax
    1516:	ff 76 04             	pushl  0x4(%esi)
    1519:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    151f:	89 44 24 18          	mov    %eax,0x18(%esp)
    1523:	8b 46 14             	mov    0x14(%esi),%eax
    1526:	89 44 24 1c          	mov    %eax,0x1c(%esp)
    152a:	5a                   	pop    %edx
    152b:	59                   	pop    %ecx
    152c:	8b 03                	mov    (%ebx),%eax
    152e:	8d 54 24 10          	lea    0x10(%esp),%edx
    1532:	52                   	push   %edx
    1533:	6a 02                	push   $0x2
    1535:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    153b:	89 44 24 24          	mov    %eax,0x24(%esp)
    153f:	58                   	pop    %eax
    1540:	5a                   	pop    %edx
    1541:	8b 03                	mov    (%ebx),%eax
    1543:	8d 54 24 18          	lea    0x18(%esp),%edx
    1547:	52                   	push   %edx
    1548:	6a 02                	push   $0x2
    154a:	ff 90 90 12 00 00    	call   *0x1290(%eax)
    1550:	8b 13                	mov    (%ebx),%edx
    1552:	89 44 24 28          	mov    %eax,0x28(%esp)
    1556:	6a 00                	push   $0x0
    1558:	6a 00                	push   $0x0
    155a:	50                   	push   %eax
    155b:	ff 76 08             	pushl  0x8(%esi)
    155e:	ff 52 24             	call   *0x24(%edx)
    1561:	8b 03                	mov    (%ebx),%eax
    1563:	89 6c 24 3c          	mov    %ebp,0x3c(%esp)
    1567:	83 c4 18             	add    $0x18,%esp
    156a:	8d 54 24 20          	lea    0x20(%esp),%edx
    156e:	52                   	push   %edx
    156f:	6a 02                	push   $0x2
    1571:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    1577:	6a 00                	push   $0x0
    1579:	8b 13                	mov    (%ebx),%edx
    157b:	6a 00                	push   $0x0
    157d:	50                   	push   %eax
    157e:	ff 76 08             	pushl  0x8(%esi)
    1581:	ff 52 24             	call   *0x24(%edx)
    1584:	8b 03                	mov    (%ebx),%eax
    1586:	83 c4 14             	add    $0x14,%esp
    1589:	ff 76 0c             	pushl  0xc(%esi)
    158c:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    1592:	89 44 24 30          	mov    %eax,0x30(%esp)
    1596:	8b 03                	mov    (%ebx),%eax
    1598:	89 6c 24 34          	mov    %ebp,0x34(%esp)
    159c:	59                   	pop    %ecx
    159d:	5d                   	pop    %ebp
    159e:	8d 54 24 28          	lea    0x28(%esp),%edx
    15a2:	52                   	push   %edx
    15a3:	6a 02                	push   $0x2
    15a5:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    15ab:	6a 00                	push   $0x0
    15ad:	8b 13                	mov    (%ebx),%edx
    15af:	6a 00                	push   $0x0
    15b1:	50                   	push   %eax
    15b2:	ff 76 0c             	pushl  0xc(%esi)
    15b5:	ff 52 24             	call   *0x24(%edx)
    15b8:	8b 03                	mov    (%ebx),%eax
    15ba:	83 c4 14             	add    $0x14,%esp
    15bd:	ff 76 04             	pushl  0x4(%esi)
    15c0:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    15c6:	89 44 24 38          	mov    %eax,0x38(%esp)
    15ca:	89 7c 24 3c          	mov    %edi,0x3c(%esp)
    15ce:	58                   	pop    %eax
    15cf:	8b 03                	mov    (%ebx),%eax
    15d1:	5a                   	pop    %edx
    15d2:	8d 54 24 30          	lea    0x30(%esp),%edx
    15d6:	52                   	push   %edx
    15d7:	6a 02                	push   $0x2
    15d9:	ff 90 88 12 00 00    	call   *0x1288(%eax)
    15df:	6a 00                	push   $0x0
    15e1:	89 c7                	mov    %eax,%edi
    15e3:	6a 00                	push   $0x0
    15e5:	8b 03                	mov    (%ebx),%eax
    15e7:	57                   	push   %edi
    15e8:	ff 76 04             	pushl  0x4(%esi)
    15eb:	ff 50 24             	call   *0x24(%eax)
    15ee:	89 f8                	mov    %edi,%eax
    15f0:	83 c4 5c             	add    $0x5c,%esp
    15f3:	5b                   	pop    %ebx
    15f4:	5e                   	pop    %esi
    15f5:	5f                   	pop    %edi
    15f6:	5d                   	pop    %ebp
    15f7:	c3                   	ret    
    15f8:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    15ff:	90                   	nop


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #14: elb-pidigits.s --]
[-- Type: text/x-asm, Size: 8594 bytes --]

00001600 <F656c622d7069646967697473_elb_pidigits_0>:
    1600:	55                   	push   %ebp
    1601:	57                   	push   %edi
    1602:	56                   	push   %esi
    1603:	53                   	push   %ebx
    1604:	e8 87 fa ff ff       	call   1090 <__x86.get_pc_thunk.bx>
    1609:	81 c3 f7 29 00 00    	add    $0x29f7,%ebx
    160f:	83 ec 54             	sub    $0x54,%esp
    1612:	8b ab f4 ff ff ff    	mov    -0xc(%ebx),%ebp
    1618:	8b b3 f8 ff ff ff    	mov    -0x8(%ebx),%esi
    161e:	8b 45 20             	mov    0x20(%ebp),%eax
    1621:	89 44 24 1c          	mov    %eax,0x1c(%esp)
    1625:	8b 06                	mov    (%esi),%eax
    1627:	6a 06                	push   $0x6
    1629:	ff 75 04             	pushl  0x4(%ebp)
    162c:	ff 50 2c             	call   *0x2c(%eax)
    162f:	8b 06                	mov    (%esi),%eax
    1631:	59                   	pop    %ecx
    1632:	5f                   	pop    %edi
    1633:	6a 06                	push   $0x6
    1635:	bf 02 00 00 00       	mov    $0x2,%edi
    163a:	ff 75 0c             	pushl  0xc(%ebp)
    163d:	ff 50 2c             	call   *0x2c(%eax)
    1640:	58                   	pop    %eax
    1641:	5a                   	pop    %edx
    1642:	8b 06                	mov    (%esi),%eax
    1644:	6a 02                	push   $0x2
    1646:	ff 75 08             	pushl  0x8(%ebp)
    1649:	ff 50 2c             	call   *0x2c(%eax)
    164c:	8b 45 24             	mov    0x24(%ebp),%eax
    164f:	83 c4 10             	add    $0x10,%esp
    1652:	c7 44 24 08 02 00 00 	movl   $0x2,0x8(%esp)
    1659:	00 
    165a:	8d 4c 24 28          	lea    0x28(%esp),%ecx
    165e:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
    1662:	8d 4c 24 30          	lea    0x30(%esp),%ecx
    1666:	89 4c 24 10          	mov    %ecx,0x10(%esp)
    166a:	8d 4c 24 38          	lea    0x38(%esp),%ecx
    166e:	89 4c 24 1c          	mov    %ecx,0x1c(%esp)
    1672:	eb 5b                	jmp    16cf <F656c622d7069646967697473_elb_pidigits_0+0xcf>
    1674:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    1678:	89 f8                	mov    %edi,%eax
    167a:	c1 f8 02             	sar    $0x2,%eax
    167d:	3d ff ff ff 1f       	cmp    $0x1fffffff,%eax
    1682:	74 7e                	je     1702 <F656c622d7069646967697473_elb_pidigits_0+0x102>
    1684:	8d 3c 85 06 00 00 00 	lea    0x6(,%eax,4),%edi
    168b:	83 ec 0c             	sub    $0xc,%esp
    168e:	57                   	push   %edi
    168f:	e8 dc f9 ff ff       	call   1070 <F656c622d6e6578742d7465726d_elb_next_term_0@plt>
    1694:	59                   	pop    %ecx
    1695:	8b 06                	mov    (%esi),%eax
    1697:	ff 75 04             	pushl  0x4(%ebp)
    169a:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    16a0:	89 44 24 40          	mov    %eax,0x40(%esp)
    16a4:	58                   	pop    %eax
    16a5:	8b 06                	mov    (%esi),%eax
    16a7:	ff 75 08             	pushl  0x8(%ebp)
    16aa:	ff 90 e4 12 00 00    	call   *0x12e4(%eax)
    16b0:	89 44 24 44          	mov    %eax,0x44(%esp)
    16b4:	58                   	pop    %eax
    16b5:	8b 06                	mov    (%esi),%eax
    16b7:	5a                   	pop    %edx
    16b8:	ff 74 24 18          	pushl  0x18(%esp)
    16bc:	6a 02                	push   $0x2
    16be:	ff 90 a0 12 00 00    	call   *0x12a0(%eax)
    16c4:	83 c4 10             	add    $0x10,%esp
    16c7:	85 c0                	test   %eax,%eax
    16c9:	74 55                	je     1720 <F656c622d7069646967697473_elb_pidigits_0+0x120>
    16cb:	8b 44 24 60          	mov    0x60(%esp),%eax
    16cf:	8b 54 24 08          	mov    0x8(%esp),%edx
    16d3:	89 44 24 2c          	mov    %eax,0x2c(%esp)
    16d7:	83 ec 08             	sub    $0x8,%esp
    16da:	8b 06                	mov    (%esi),%eax
    16dc:	89 54 24 30          	mov    %edx,0x30(%esp)
    16e0:	ff 74 24 14          	pushl  0x14(%esp)
    16e4:	6a 02                	push   $0x2
    16e6:	ff 90 98 12 00 00    	call   *0x1298(%eax)
    16ec:	83 c4 10             	add    $0x10,%esp
    16ef:	85 c0                	test   %eax,%eax
    16f1:	0f 85 d9 00 00 00    	jne    17d0 <F656c622d7069646967697473_elb_pidigits_0+0x1d0>
    16f7:	8d 47 fe             	lea    -0x2(%edi),%eax
    16fa:	a8 03                	test   $0x3,%al
    16fc:	0f 84 76 ff ff ff    	je     1678 <F656c622d7069646967697473_elb_pidigits_0+0x78>
    1702:	83 ec 0c             	sub    $0xc,%esp
    1705:	8b 06                	mov    (%esi),%eax
    1707:	57                   	push   %edi
    1708:	ff 90 5c 12 00 00    	call   *0x125c(%eax)
    170e:	89 c7                	mov    %eax,%edi
    1710:	83 c4 10             	add    $0x10,%esp
    1713:	e9 73 ff ff ff       	jmp    168b <F656c622d7069646967697473_elb_pidigits_0+0x8b>
    1718:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    171f:	90                   	nop
    1720:	83 ec 0c             	sub    $0xc,%esp
    1723:	6a 0e                	push   $0xe
    1725:	e8 36 f9 ff ff       	call   1060 <F656c622d657874726163742d6469676974_elb_extract_digit_0@plt>
    172a:	c7 04 24 12 00 00 00 	movl   $0x12,(%esp)
    1731:	89 44 24 28          	mov    %eax,0x28(%esp)
    1735:	89 44 24 48          	mov    %eax,0x48(%esp)
    1739:	e8 22 f9 ff ff       	call   1060 <F656c622d657874726163742d6469676974_elb_extract_digit_0@plt>
    173e:	89 44 24 4c          	mov    %eax,0x4c(%esp)
    1742:	58                   	pop    %eax
    1743:	8b 06                	mov    (%esi),%eax
    1745:	5a                   	pop    %edx
    1746:	ff 74 24 24          	pushl  0x24(%esp)
    174a:	6a 02                	push   $0x2
    174c:	ff 90 a8 12 00 00    	call   *0x12a8(%eax)
    1752:	83 c4 10             	add    $0x10,%esp
    1755:	85 c0                	test   %eax,%eax
    1757:	0f 84 6e ff ff ff    	je     16cb <F656c622d7069646967697473_elb_pidigits_0+0xcb>
    175d:	83 ec 08             	sub    $0x8,%esp
    1760:	8b 06                	mov    (%esi),%eax
    1762:	ff 74 24 1c          	pushl  0x1c(%esp)
    1766:	ff 74 24 24          	pushl  0x24(%esp)
    176a:	ff 90 b4 0f 00 00    	call   *0xfb4(%eax)
    1770:	8b 4c 24 18          	mov    0x18(%esp),%ecx
    1774:	89 44 24 24          	mov    %eax,0x24(%esp)
    1778:	8d 41 fe             	lea    -0x2(%ecx),%eax
    177b:	83 c4 10             	add    $0x10,%esp
    177e:	a8 03                	test   $0x3,%al
    1780:	75 1e                	jne    17a0 <F656c622d7069646967697473_elb_pidigits_0+0x1a0>
    1782:	89 c8                	mov    %ecx,%eax
    1784:	c1 f8 02             	sar    $0x2,%eax
    1787:	3d ff ff ff 1f       	cmp    $0x1fffffff,%eax
    178c:	74 12                	je     17a0 <F656c622d7069646967697473_elb_pidigits_0+0x1a0>
    178e:	8d 04 85 06 00 00 00 	lea    0x6(,%eax,4),%eax
    1795:	89 44 24 08          	mov    %eax,0x8(%esp)
    1799:	eb 1b                	jmp    17b6 <F656c622d7069646967697473_elb_pidigits_0+0x1b6>
    179b:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    179f:	90                   	nop
    17a0:	83 ec 0c             	sub    $0xc,%esp
    17a3:	8b 06                	mov    (%esi),%eax
    17a5:	ff 74 24 14          	pushl  0x14(%esp)
    17a9:	ff 90 5c 12 00 00    	call   *0x125c(%eax)
    17af:	89 44 24 18          	mov    %eax,0x18(%esp)
    17b3:	83 c4 10             	add    $0x10,%esp
    17b6:	83 ec 0c             	sub    $0xc,%esp
    17b9:	ff 74 24 24          	pushl  0x24(%esp)
    17bd:	e8 8e f8 ff ff       	call   1050 <F656c622d656c696d696e6174652d6469676974_elb_eliminate_digit_0@plt>
    17c2:	83 c4 10             	add    $0x10,%esp
    17c5:	e9 01 ff ff ff       	jmp    16cb <F656c622d7069646967697473_elb_pidigits_0+0xcb>
    17ca:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
    17d0:	8b 06                	mov    (%esi),%eax
    17d2:	83 ec 0c             	sub    $0xc,%esp
    17d5:	ff 74 24 20          	pushl  0x20(%esp)
    17d9:	ff 90 20 11 00 00    	call   *0x1120(%eax)
    17df:	89 c3                	mov    %eax,%ebx
    17e1:	8b 06                	mov    (%esi),%eax
    17e3:	c7 04 24 0e 00 00 00 	movl   $0xe,(%esp)
    17ea:	ff 50 18             	call   *0x18(%eax)
    17ed:	83 c4 5c             	add    $0x5c,%esp
    17f0:	89 d8                	mov    %ebx,%eax
    17f2:	5b                   	pop    %ebx
    17f3:	5e                   	pop    %esi
    17f4:	5f                   	pop    %edi
    17f5:	5d                   	pop    %ebp
    17f6:	c3                   	ret    
    17f7:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
    17fe:	66 90                	xchg   %ax,%ax


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #15: elb-pidigits-entry.s --]
[-- Type: text/x-asm, Size: 3066 bytes --]

00001800 <F656c622d70696469676974732d656e747279_elb_pidigits_entry_0>:
    1800:	55                   	push   %ebp
    1801:	57                   	push   %edi
    1802:	56                   	push   %esi
    1803:	53                   	push   %ebx
    1804:	e8 87 f8 ff ff       	call   1090 <__x86.get_pc_thunk.bx>
    1809:	81 c3 f7 27 00 00    	add    $0x27f7,%ebx
    180f:	83 ec 2c             	sub    $0x2c,%esp
    1812:	8d 44 24 18          	lea    0x18(%esp),%eax
    1816:	89 44 24 0c          	mov    %eax,0xc(%esp)
    181a:	8b bb f4 ff ff ff    	mov    -0xc(%ebx),%edi
    1820:	8b b3 f8 ff ff ff    	mov    -0x8(%ebx),%esi
    1826:	8b 6f 40             	mov    0x40(%edi),%ebp
    1829:	eb 4b                	jmp    1876 <F656c622d70696469676974732d656e747279_elb_pidigits_entry_0+0x76>
    182b:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    182f:	90                   	nop
    1830:	89 e8                	mov    %ebp,%eax
    1832:	c1 f8 02             	sar    $0x2,%eax
    1835:	3d 00 00 00 e0       	cmp    $0xe0000000,%eax
    183a:	74 41                	je     187d <F656c622d70696469676974732d656e747279_elb_pidigits_entry_0+0x7d>
    183c:	8d 2c 85 fe ff ff ff 	lea    -0x2(,%eax,4),%ebp
    1843:	8b 47 18             	mov    0x18(%edi),%eax
    1846:	89 6c 24 18          	mov    %ebp,0x18(%esp)
    184a:	83 ec 08             	sub    $0x8,%esp
    184d:	89 44 24 24          	mov    %eax,0x24(%esp)
    1851:	8b 06                	mov    (%esi),%eax
    1853:	ff 74 24 14          	pushl  0x14(%esp)
    1857:	6a 02                	push   $0x2
    1859:	ff 90 98 12 00 00    	call   *0x1298(%eax)
    185f:	83 c4 10             	add    $0x10,%esp
    1862:	85 c0                	test   %eax,%eax
    1864:	74 2a                	je     1890 <F656c622d70696469676974732d656e747279_elb_pidigits_entry_0+0x90>
    1866:	83 ec 0c             	sub    $0xc,%esp
    1869:	68 d2 07 00 00       	push   $0x7d2
    186e:	e8 cd f7 ff ff       	call   1040 <F656c622d7069646967697473_elb_pidigits_0@plt>
    1873:	83 c4 10             	add    $0x10,%esp
    1876:	8d 45 fe             	lea    -0x2(%ebp),%eax
    1879:	a8 03                	test   $0x3,%al
    187b:	74 b3                	je     1830 <F656c622d70696469676974732d656e747279_elb_pidigits_entry_0+0x30>
    187d:	83 ec 0c             	sub    $0xc,%esp
    1880:	8b 06                	mov    (%esi),%eax
    1882:	55                   	push   %ebp
    1883:	ff 90 58 12 00 00    	call   *0x1258(%eax)
    1889:	89 c5                	mov    %eax,%ebp
    188b:	83 c4 10             	add    $0x10,%esp
    188e:	eb b3                	jmp    1843 <F656c622d70696469676974732d656e747279_elb_pidigits_entry_0+0x43>
    1890:	83 c4 2c             	add    $0x2c,%esp
    1893:	31 c0                	xor    %eax,%eax
    1895:	5b                   	pop    %ebx
    1896:	5e                   	pop    %esi
    1897:	5f                   	pop    %edi
    1898:	5d                   	pop    %ebp
    1899:	c3                   	ret    
    189a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi


[-- Attachment #16: Type: text/plain, Size: 110 bytes --]


Let me know what I can do to help diagnose this further.  Again, thank
you for the time spent on this issue!

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-06-14 15:19       ` Kévin Le Gouguec
@ 2020-06-14 16:19         ` Andrea Corallo
  2020-06-14 20:47           ` Kévin Le Gouguec
  0 siblings, 1 reply; 9+ messages in thread
From: Andrea Corallo @ 2020-06-14 16:19 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 41194

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> Andrea Corallo <akrl@sdf.org> writes:
>
>> 5a55a845a7 * Implement 'maybe_gc_or_quit' to allow correct GC in compiled Lisp
>> 34ed9d2498 * Introduce latches
>>
>> are fixing here this issue, now running fibn at speed 2 the memory
>> consuptions stays constant.
>
> Alright, feedback time!
>
> Commits:
> - master: 82a632edc8b80bf16d9b9f205474bf9724b084c0
> - feature/native-comp: 5a55a845a7c426e82e8a6a6d02bc4a39992871e3
>
>
> The Good News
> =============
>
> - I can compile the branch without adding files to the default
>   blacklist,
>
> - compilation (-j1) now only takes less than 6 hours instead of 3 days
>   (compared with 1.5 hour on master),
>
> - at no point during compilation did the system swap; in fact, I could
>   probably have risked a -j2 build,
>
> - elisp-benchmarks doesn't show any obvious performance regression
>   (… though see Bad News).
>
> For details on memory usage during compilation, see attached memory
> profile (to compare with bug#41077#28).

Hi Kévin,

this is very good new thanks!  If I read correctly we are always under
about 600MB as memory consumption is this correct?

>
> Few files take more than 3 minutes to compile now:
>
> ELC+ELN emacs-lisp/comp.el      0:09:49
> ELC+ELN org/org.el              0:03:39
> ELC+ELN ../lisp/window.el       0:03:16
> ELC+ELN emacs-lisp/bytecomp.el  0:03:16
>
> For details on performance, see attached tables for master and
> feature/native-comp, respectively (to compare with bug#41077#40).
>
>
>
>
> The Bad News
> ============
>
> - fibn still exhausts memory,
> - now pidigits does too.
>
>
>
>
> I've only tried the default comp-speed (2) so far.  I've attached the
> results of M-x disassemble on the functions in fibn.el and pidigits.el.


I suspect we are still looking at a speed 3 run.  How comp-speed was set
for the test?

I ask that because for now speed 3 is written into the stone within
elisp-benchmarks.el, yeah... :/ and so has to be manually changed there.

Thanks!

  Andrea

-- 
akrl@sdf.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-06-14 16:19         ` Andrea Corallo
@ 2020-06-14 20:47           ` Kévin Le Gouguec
  2020-06-14 21:45             ` Andrea Corallo
  0 siblings, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2020-06-14 20:47 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 41194-done

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

Andrea Corallo <akrl@sdf.org> writes:

> this is very good new thanks!  If I read correctly we are always under
> about 600MB as memory consumption is this correct?

Yep.  I can post the detailed data here if that's needed; here are the
10 files that took the most virtual memory (vsz):

 1. org/org.el              541.2 MB
 2. gnus/gnus-sum.el        459.3 MB
 3. emacs-lisp/comp.el      455.2 MB
 4. net/tramp.el            408.2 MB
 5. net/tramp-adb.el        390.4 MB
 6. net/tramp-sh.el         371.0 MB
 7. progmodes/cperl-mode.el 356.2 MB
 8. ../lisp/window.el       348.9 MB
 9. gnus/message.el         345.4 MB
10. net/soap-client.el      344.4 MB

And the 10 files that took the most resident memory (rss):

 1. org/org.el              361.6 MB
 2. emacs-lisp/comp.el      287.3 MB
 3. gnus/gnus-sum.el        286.7 MB
 4. net/tramp.el            236.8 MB
 5. net/tramp-adb.el        218.1 MB
 6. net/tramp-sh.el         199.0 MB
 7. progmodes/cperl-mode.el 185.0 MB
 8. ../lisp/window.el       181.6 MB
 9. gnus/message.el         174.0 MB
10. erc/erc.el              173.5 MB

> I suspect we are still looking at a speed 3 run.  How comp-speed was set
> for the test?
>
> I ask that because for now speed 3 is written into the stone within
> elisp-benchmarks.el, yeah... :/ and so has to be manually changed there.

Now that's just sneaky 😛 You're right, it was a speed 3 run.  Setting
comp-speed to 2 in elisp-benchmarks.el, I now get the attached results.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: perfs.org --]
[-- Type: text/x-org, Size: 4575 bytes --]

* Results
** master
#+TBLNAME: master
| test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) |
|----------------+----------------+------------+---------+-------------+-----------------|
| bubble-no-cons |         118.41 |       0.23 |       3 |      118.63 |            0.36 |
| bubble         |          46.29 |      29.34 |     388 |       75.63 |            0.36 |
| dhrystone      |          74.82 |       0.00 |       0 |       74.82 |            0.34 |
| fibn-rec       |          59.50 |       0.00 |       0 |       59.50 |            0.28 |
| fibn-tc        |         147.39 |      96.86 |    1179 |      244.26 |            2.70 |
| fibn           |         320.33 |     276.23 |    3442 |      596.56 |            5.31 |
| flet           |         112.02 |       0.00 |       0 |      112.02 |            0.29 |
| inclist        |         166.30 |       0.00 |       0 |      166.30 |            0.67 |
| listlen-tc     |          76.97 |       0.00 |       0 |       76.97 |            0.53 |
| map-closure    |          81.86 |       0.00 |       0 |       81.86 |            0.31 |
| nbody          |          28.62 |      98.53 |    1303 |      127.14 |            0.21 |
| pcase          |         110.63 |       0.00 |       0 |      110.63 |            0.29 |
| pidigits       |          61.78 |      39.46 |     469 |      101.24 |            0.70 |
|----------------+----------------+------------+---------+-------------+-----------------|
| total          |        1404.92 |     540.65 |    6786 |     1945.57 |            6.13 |
** feature/native-comp
#+TBLNAME: feature/native-comp
| test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) |
|----------------+----------------+------------+---------+-------------+-----------------|
| bubble-no-cons |          30.12 |       0.16 |       2 |       30.28 |            0.04 |
| bubble         |          18.05 |      27.91 |     352 |       45.96 |            0.33 |
| dhrystone      |          34.26 |       0.00 |       0 |       34.26 |            0.05 |
| fibn-rec       |          26.92 |       0.00 |       0 |       26.92 |            0.03 |
| fibn-tc        |          98.66 |      93.89 |    1096 |      192.55 |            1.66 |
| fibn           |         253.19 |     269.12 |    3192 |      522.31 |            2.17 |
| flet           |          22.92 |       0.00 |       0 |       22.92 |            0.04 |
| inclist        |          11.76 |       0.00 |       0 |       11.76 |            0.16 |
| listlen-tc     |          21.44 |       0.00 |       0 |       21.44 |            0.05 |
| map-closure    |          80.57 |       0.00 |       0 |       80.57 |            0.03 |
| nbody          |          15.62 |      95.66 |    1212 |      111.28 |            0.10 |
| pcase          |          17.64 |       0.00 |       0 |       17.64 |            0.03 |
| pidigits       |          59.82 |      38.86 |     436 |       98.68 |            0.39 |
|----------------+----------------+------------+---------+-------------+-----------------|
| total          |         690.98 |     525.59 |    6291 |     1216.57 |            2.79 |
** ratio
| test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) |
|----------------+----------------+------------+---------+-------------|
| bubble-no-cons |           3.92 |       1.44 |     1.5 |        3.93 |
| bubble         |           2.56 |       1.05 |     1.1 |        1.64 |
| dhrystone      |           2.18 |            |         |        2.18 |
| fibn-rec       |           2.21 |            |         |        2.21 |
| fibn-tc        |           1.49 |       1.03 |    1.07 |        1.26 |
| fibn           |           1.26 |       1.03 |    1.08 |        1.14 |
| flet           |           4.89 |            |         |        4.89 |
| inclist        |           14.1 |            |         |        14.1 |
| listlen-tc     |            3.6 |            |         |         3.6 |
| map-closure    |           1.02 |            |         |        1.02 |
| nbody          |           1.83 |       1.03 |    1.07 |        1.14 |
| pcase          |           6.31 |            |         |        6.31 |
| pidigits       |           1.03 |       1.02 |    1.08 |        1.02 |
|----------------+----------------+------------+---------+-------------|
| total          |           2.03 |       1.03 |    1.08 |         1.6 |
#+TBLFM: @2$2..@>$> = if (remote(feature/native-comp,@@#$$#)!=0, remote(master,@@#$$#)/remote(feature/native-comp,@@#$$#), string("")); p3

[-- Attachment #3: Type: text/plain, Size: 153 bytes --]


Conclusion: I'm closing this report!  Again, thank you for your efforts.

(And thank you for this opportunity to learn about Org spreadsheets 😉)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory
  2020-06-14 20:47           ` Kévin Le Gouguec
@ 2020-06-14 21:45             ` Andrea Corallo
  0 siblings, 0 replies; 9+ messages in thread
From: Andrea Corallo @ 2020-06-14 21:45 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 41194

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

> Andrea Corallo <akrl@sdf.org> writes:
>
>> this is very good new thanks!  If I read correctly we are always under
>> about 600MB as memory consumption is this correct?
>
> Yep.  I can post the detailed data here if that's needed; here are the
> 10 files that took the most virtual memory (vsz):
>
>  1. org/org.el              541.2 MB
>  2. gnus/gnus-sum.el        459.3 MB
>  3. emacs-lisp/comp.el      455.2 MB
>  4. net/tramp.el            408.2 MB
>  5. net/tramp-adb.el        390.4 MB
>  6. net/tramp-sh.el         371.0 MB
>  7. progmodes/cperl-mode.el 356.2 MB
>  8. ../lisp/window.el       348.9 MB
>  9. gnus/message.el         345.4 MB
> 10. net/soap-client.el      344.4 MB

Cool, I guess means should be buildable at -j3 with 2GB of ram.

> And the 10 files that took the most resident memory (rss):
>
>  1. org/org.el              361.6 MB
>  2. emacs-lisp/comp.el      287.3 MB
>  3. gnus/gnus-sum.el        286.7 MB
>  4. net/tramp.el            236.8 MB
>  5. net/tramp-adb.el        218.1 MB
>  6. net/tramp-sh.el         199.0 MB
>  7. progmodes/cperl-mode.el 185.0 MB
>  8. ../lisp/window.el       181.6 MB
>  9. gnus/message.el         174.0 MB
> 10. erc/erc.el              173.5 MB
>
>> I suspect we are still looking at a speed 3 run.  How comp-speed was set
>> for the test?
>>
>> I ask that because for now speed 3 is written into the stone within
>> elisp-benchmarks.el, yeah... :/ and so has to be manually changed there.
>
> Now that's just sneaky 😛 

Well... we can also just call it bad :)

> * Results
> ** master
>
> #+TBLNAME: master
> | test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) |
>
> |----------------+----------------+------------+---------+-------------+-----------------|
> | bubble-no-cons |         118.41 |       0.23 |       3 |      118.63 |            0.36 |
> | bubble         |          46.29 |      29.34 |     388 |       75.63 |            0.36 |
> | dhrystone      |          74.82 |       0.00 |       0 |       74.82 |            0.34 |
> | fibn-rec       |          59.50 |       0.00 |       0 |       59.50 |            0.28 |
> | fibn-tc        |         147.39 |      96.86 |    1179 |      244.26 |            2.70 |
> | fibn           |         320.33 |     276.23 |    3442 |      596.56 |            5.31 |
> | flet           |         112.02 |       0.00 |       0 |      112.02 |            0.29 |
> | inclist        |         166.30 |       0.00 |       0 |      166.30 |            0.67 |
> | listlen-tc     |          76.97 |       0.00 |       0 |       76.97 |            0.53 |
> | map-closure    |          81.86 |       0.00 |       0 |       81.86 |            0.31 |
> | nbody          |          28.62 |      98.53 |    1303 |      127.14 |            0.21 |
> | pcase          |         110.63 |       0.00 |       0 |      110.63 |            0.29 |
> | pidigits       |          61.78 |      39.46 |     469 |      101.24 |            0.70 |
> |----------------+----------------+------------+---------+-------------+-----------------|
> | total          |        1404.92 |     540.65 |    6786 |     1945.57 |            6.13 |
> ** feature/native-comp
>
> #+TBLNAME: feature/native-comp
> | test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) |
>
> |----------------+----------------+------------+---------+-------------+-----------------|
> | bubble-no-cons |          30.12 |       0.16 |       2 |       30.28 |            0.04 |
> | bubble         |          18.05 |      27.91 |     352 |       45.96 |            0.33 |
> | dhrystone      |          34.26 |       0.00 |       0 |       34.26 |            0.05 |
> | fibn-rec       |          26.92 |       0.00 |       0 |       26.92 |            0.03 |
> | fibn-tc        |          98.66 |      93.89 |    1096 |      192.55 |            1.66 |
> | fibn           |         253.19 |     269.12 |    3192 |      522.31 |            2.17 |
> | flet           |          22.92 |       0.00 |       0 |       22.92 |            0.04 |
> | inclist        |          11.76 |       0.00 |       0 |       11.76 |            0.16 |
> | listlen-tc     |          21.44 |       0.00 |       0 |       21.44 |            0.05 |
> | map-closure    |          80.57 |       0.00 |       0 |       80.57 |            0.03 |
> | nbody          |          15.62 |      95.66 |    1212 |      111.28 |            0.10 |
> | pcase          |          17.64 |       0.00 |       0 |       17.64 |            0.03 |
> | pidigits       |          59.82 |      38.86 |     436 |       98.68 |            0.39 |
> |----------------+----------------+------------+---------+-------------+-----------------|
> | total          |         690.98 |     525.59 |    6291 |     1216.57 |            2.79 |
> ** ratio
> | test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) |
> |----------------+----------------+------------+---------+-------------|
> | bubble-no-cons |           3.92 |       1.44 |     1.5 |        3.93 |
> | bubble         |           2.56 |       1.05 |     1.1 |        1.64 |
> | dhrystone      |           2.18 |            |         |        2.18 |
> | fibn-rec       |           2.21 |            |         |        2.21 |
> | fibn-tc        |           1.49 |       1.03 |    1.07 |        1.26 |
> | fibn           |           1.26 |       1.03 |    1.08 |        1.14 |
> | flet           |           4.89 |            |         |        4.89 |
> | inclist        |           14.1 |            |         |        14.1 |
> | listlen-tc     |            3.6 |            |         |         3.6 |
> | map-closure    |           1.02 |            |         |        1.02 |
> | nbody          |           1.83 |       1.03 |    1.07 |        1.14 |
> | pcase          |           6.31 |            |         |        6.31 |
> | pidigits       |           1.03 |       1.02 |    1.08 |        1.02 |
> |----------------+----------------+------------+---------+-------------|
> | total          |           2.03 |       1.03 |    1.08 |         1.6 |
>
> #+TBLFM: @2$2..@>$> = if (remote(feature/native-comp,@@#$$#)!=0, remote(master,@@#$$#)/remote(feature/native-comp,@@#$$#), string("")); p3

That's not bad for speed 2, GC and funcall are eating part of the perf,
probably with bigger function bodies we would see more delta.

>
> Conclusion: I'm closing this report!  Again, thank you for your efforts.
>
> (And thank you for this opportunity to learn about Org spreadsheets 😉)

Thanks for your inputs!

  Andrea

-- 
akrl@sdf.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-14 21:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-11 20:47 bug#41194: 28.0.50; [feature/native-comp] fibn benchmark exhausts memory Kévin Le Gouguec
2020-06-09 22:24 ` Andrea Corallo
2020-06-10  7:55   ` Kévin Le Gouguec
2020-06-13 15:00     ` Andrea Corallo
2020-06-13 18:17       ` Kévin Le Gouguec
2020-06-14 15:19       ` Kévin Le Gouguec
2020-06-14 16:19         ` Andrea Corallo
2020-06-14 20:47           ` Kévin Le Gouguec
2020-06-14 21:45             ` Andrea Corallo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).