awesomeWM / awesome

awesome window manager
https://awesomewm.org/
GNU General Public License v2.0
6.34k stars 597 forks source link

Memory leak by xdotool use #2258

Closed pmasterc3 closed 6 years ago

pmasterc3 commented 6 years ago

Output of awesome --version:

$ awesome --version awesome v4.2 (Human after all) ⢠Compiled against Lua 5.3.3 (running with Lua 5.3) ⢠D-Bus support: â ⢠execinfo support: â ⢠xcb-randr version: 1.6 ⢠LGI version: 0.9.2

How to reproduce the issue:

Start awesome 4.2 (on debian 10), start xterm and execute the following script: `#/bin/sh

set -e set -x

AP=$(pidof awesome) O="$HOME/awesome/"

cp /proc/$AP/smaps "$O/smaps.pre.txt" cp /proc/$AP/maps "$O/maps.pre.txt" pmap "$AP" > "$O/pmap.pre.txt"

xdotool mousemove 500 400 click --repeat 1000000 --delay 1 1

cp /proc/$AP/smaps "$O/smaps.post.txt" cp /proc/$AP/maps "$O/maps.post.txt" pmap "$AP" > "$O/pmap.post.txt"`

Actual result:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND   
 1426 pmaster   20   0  710624 274280  17852 S   0.0   7.3   2:22.62 awesome 

 $ diff maps.pre.txt maps.post.txt 
4c4
< 55d13e83d000-55d13fc32000 rw-p 00000000 00:00 0                          [heap]
---
> 55d13e83d000-55d14dd74000 rw-p 00000000 00:00 0                          [heap]

 $ diff pmap.{pre,post}.txt  
5c5
< 000055d13e83d000  20436K rw---   [ anon ]
---
> 000055d13e83d000 251100K rw---   [ anon ]
350c350
<  total           474056K
---
>  total           704720K

Expected result: Less memory used

psychon commented 6 years ago

My first guess would be: Welcome to language with a garbage collector.

and execute the following script:

Well, the only important part is xdotool mousemove 500 400 click --repeat 1000000 --delay 1 1, right? The rest of the script does not actually do much. Is it important if:

--repeat 1000000 --delay 1

That's one million milliseconds, right? So, 1000 seconds, which are about 17 minutes. Plus whatever additional time delay xdotool runs into. Sigh, okay, I'll wait. Since I guess you already checked: How is the memory usage when just run awesome for 17 minutes without clicking around? Is it much different? Right now I'm running awesome in Xephyr and under valgrind --tool=massif. I'll edit-update this comment with results.

== Just an empty Xephyr + lots of clicks == Edit: Replaced the first version of the following with new results done with debug symbols available.

--------------------------------------------------------------------------------
Command:            /home/psychon/projects/awesome/build/awesome -c /home/psychon/projects/awesome/awesomerc.lua --search lib --search /home/psychon/projects/awesome/tests
Massif arguments:   (none)
ms_print arguments: massif.out.14626
--------------------------------------------------------------------------------

    MB
155.4^                                                                       #
     |                                                                   @@@@#
     |                                                                :::@@@@#
     |                                                            ::::: :@@@@#
     |                                                        @@:::: :: :@@@@#
     |                                                    ::@@@ :::: :: :@@@@#
     |                                                 ::@: @@@ :::: :: :@@@@#
     |                                              :::::@: @@@ :::: :: :@@@@#
     |                                          :::::::::@: @@@ :::: :: :@@@@#
     |                                    @@@@@@: : :::::@: @@@ :::: :: :@@@@#
     |                                 :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     |                              ::::::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     |                         ::@:::: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     |                      ::@::@: :: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     |                   :::::@::@: :: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     |              @:::::: ::@::@: :: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     |         :::::@: : :: ::@::@: :: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     |       ::: :: @: : :: ::@::@: :: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     | ::::::::: :: @: : :: ::@::@: :: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
     | : ::: ::: :: @: : :: ::@::@: :: :::@ @ @ : : :::::@: @@@ :::: :: :@@@@#
   0 +----------------------------------------------------------------------->Gi
     0                                                                   20.56

Number of snapshots: 58
 Detailed snapshots: [10, 17, 20, 27, 28, 29, 37, 39, 40, 41, 49, 50, 51, 53, 55, 56 (peak)]

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
  0              0                0                0             0            0
  1    532,466,375       17,790,528       16,780,058     1,010,470            0
  2    937,059,363       18,279,472       16,731,066     1,548,406            0
  3  1,238,552,085       20,354,424       18,347,348     2,007,076            0
  4  1,824,029,998       24,398,232       21,492,532     2,905,700            0
  5  2,266,525,307       27,456,144       23,870,908     3,585,236            0
  6  2,568,959,814       29,541,376       25,495,094     4,046,282            0
  7  3,035,240,571       32,759,528       27,998,134     4,761,394            0
  8  3,375,575,989       35,107,344       29,826,560     5,280,784            0
  9  3,793,377,532       37,995,120       32,072,608     5,922,512            0
 10  4,387,733,859       42,099,400       35,267,142     6,832,258            0
83.77% (35,267,142B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->57.90% (24,375,131B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->50.39% (21,211,823B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->47.20% (19,869,248B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->46.80% (19,701,808B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->46.72% (19,669,608B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->46.46% (19,559,568B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->46.46% (19,559,568B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->46.46% (19,559,568B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->45.13% (19,000,408B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->45.13% (18,999,848B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->45.13% (18,999,848B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->45.13% (18,999,848B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->45.13% (18,999,848B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->45.13% (18,999,848B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->01.33% (559,160B) in 5 places, all below massif's threshold (1.00%)
| | | | | |       
| | | | | ->00.26% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.08% (32,200B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.40% (167,440B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->03.19% (1,342,575B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->04.73% (1,991,640B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->03.52% (1,483,800B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.53% (642,600B) 0x80A189D: luaV_settable (lvm.c:152)
| | | | ->01.28% (539,320B) 0x80A3103: luaV_execute (lvm.c:600)
| | | | | ->01.12% (469,920B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | | ->01.12% (469,920B) in 3 places, all below massif's threshold (1.00%)
| | | | | |   
| | | | | ->00.16% (69,400B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.25% (103,280B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->01.02% (427,440B) 0x809A251: luaX_newstring (llex.c:129)
| | | | ->01.02% (427,440B) in 9 places, all below massif's threshold (1.00%)
| | | |   
| | | ->00.98% (413,760B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.17% (492,120B) 0x80A3684: luaV_execute (lvm.c:603)
| | | ->01.07% (449,280B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | ->01.07% (449,280B) in 3 places, all below massif's threshold (1.00%)
| | | |   
| | | ->00.10% (42,840B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->00.04% (15,720B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->02.78% (1,171,668B) in 17 places, all below massif's threshold (1.00%)
|   
->22.46% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->22.46% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->22.46% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->22.46% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->22.46% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->22.46% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->22.46% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->22.46% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->22.46% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->22.46% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->22.46% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->22.46% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->22.46% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->22.46% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->22.46% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->22.46% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.01% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->03.41% (1,435,943B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 11  4,877,795,201       45,486,976       37,901,954     7,585,022            0
 12  5,349,025,698       48,744,112       40,435,282     8,308,830            0
 13  5,927,423,189       52,754,576       43,561,420     9,193,156            0
 14  6,333,337,967       55,556,208       45,740,468     9,815,740            0
 15  6,824,784,490       58,945,608       48,378,970    10,566,638            0
 16  7,168,346,045       61,319,072       50,225,046    11,094,026            0
 17  7,549,821,213       63,944,408       52,269,288    11,675,120            0
81.74% (52,269,288B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->64.68% (41,361,209B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->59.66% (38,146,773B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->57.53% (36,789,816B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->57.27% (36,622,040B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->57.22% (36,588,664B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->57.05% (36,478,624B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->57.05% (36,478,624B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->57.05% (36,478,624B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->56.14% (35,901,320B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->56.14% (35,900,760B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->56.14% (35,900,760B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->56.14% (35,900,760B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->56.14% (35,900,760B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->56.14% (35,900,760B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.90% (577,304B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.17% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.05% (33,376B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.26% (167,776B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->02.12% (1,356,957B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->03.19% (2,036,720B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->02.36% (1,507,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.35% (861,680B) in 4 places, all below massif's threshold (1.00%)
| | | | 
| | | ->01.01% (645,600B) 0x80A189D: luaV_settable (lvm.c:152)
| | |   ->01.01% (645,600B) in 5 places, all below massif's threshold (1.00%)
| | |     
| | ->00.83% (529,440B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.84% (1,177,716B) in 17 places, all below massif's threshold (1.00%)
|   
->14.79% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->14.79% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->14.79% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->14.79% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->14.79% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->14.79% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->14.79% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->14.79% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->14.79% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->14.79% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->14.79% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->14.79% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->14.78% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->14.78% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->14.78% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->14.78% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->02.27% (1,452,011B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 18  7,804,945,900       65,707,136       53,640,360    12,066,776            0
 19  8,189,099,225       68,356,808       55,701,216    12,655,592            0
 20  8,417,932,245       69,935,784       56,929,288    13,006,496            0
81.40% (56,929,288B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->65.81% (46,021,417B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->61.21% (42,806,981B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->59.27% (41,450,024B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->59.03% (41,282,248B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->58.98% (41,248,872B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->58.82% (41,138,832B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->58.82% (41,138,832B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->58.82% (41,138,832B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->58.00% (40,561,528B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->58.00% (40,560,968B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->58.00% (40,560,968B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->58.00% (40,560,968B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->58.00% (40,560,968B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->58.00% (40,560,968B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.83% (577,304B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.16% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.05% (33,376B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.24% (167,776B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.94% (1,356,957B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->02.91% (2,036,720B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->02.16% (1,507,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->02.16% (1,507,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.76% (529,440B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.68% (1,177,716B) in 17 places, all below massif's threshold (1.00%)
|   
->13.52% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->13.52% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->13.52% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->13.52% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->13.52% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->13.52% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->13.52% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->13.52% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->13.52% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->13.52% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->13.52% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->13.52% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->13.52% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->13.52% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->13.52% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->13.52% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->02.08% (1,451,803B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 21  8,818,022,126       72,692,664       59,075,866    13,616,798            0
 22  9,242,917,402       75,618,800       61,351,770    14,267,030            0
 23  9,684,986,258       78,664,024       63,722,608    14,941,416            0
 24 10,143,424,296       81,832,904       66,187,300    15,645,604            0
 25 10,621,034,072       85,128,776       68,750,756    16,378,020            0
 26 10,867,947,667       86,828,000       70,074,750    16,753,250            0
 27 11,283,010,155       89,690,120       72,300,782    17,389,338            0
80.61% (72,300,782B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->68.43% (61,376,791B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->64.81% (58,131,707B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->63.28% (56,760,368B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->63.10% (56,592,256B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->63.06% (56,557,704B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->62.94% (56,447,664B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->62.94% (56,447,664B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->62.94% (56,447,664B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->62.27% (55,852,216B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->62.27% (55,851,656B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->62.27% (55,851,656B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->62.27% (55,851,656B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->62.27% (55,851,656B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->62.27% (55,851,656B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.66% (595,448B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.12% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.04% (34,552B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.19% (168,112B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.53% (1,371,339B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->02.30% (2,061,320B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.68% (1,510,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.68% (1,510,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.61% (551,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.32% (1,183,764B) in 17 places, all below massif's threshold (1.00%)
|   
->10.54% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->10.54% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->10.54% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->10.54% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->10.54% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->10.54% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->10.54% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->10.54% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->10.54% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->10.54% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->10.54% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->10.54% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->10.54% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->10.54% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->10.54% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->10.54% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->01.64% (1,467,923B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 28 11,810,375,544       93,332,192       75,135,880    18,196,312            0
80.50% (75,135,880B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->68.79% (64,206,585B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->65.31% (60,951,285B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->63.83% (59,575,152B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->63.65% (59,406,928B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->63.61% (59,371,984B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->63.50% (59,261,944B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->63.50% (59,261,944B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->63.50% (59,261,944B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->62.85% (58,660,448B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->62.85% (58,659,888B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->62.85% (58,659,888B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->62.85% (58,659,888B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->62.85% (58,659,888B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->62.85% (58,659,888B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.64% (601,496B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.12% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.04% (34,944B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.18% (168,224B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.47% (1,376,133B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->02.22% (2,069,520B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.62% (1,511,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.62% (1,511,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.60% (558,240B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.27% (1,185,780B) in 17 places, all below massif's threshold (1.00%)
|   
->10.13% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->10.13% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->10.13% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->10.13% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->10.13% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->10.13% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->10.13% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->10.13% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->10.13% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->10.13% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->10.13% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->10.13% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->10.13% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->10.13% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->10.13% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->10.13% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->01.58% (1,473,227B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 29 12,359,057,837       97,122,248       78,083,732    19,038,516            0
80.40% (78,083,732B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->69.14% (67,154,593B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->65.79% (63,899,293B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->64.38% (62,523,160B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->64.20% (62,354,936B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->64.17% (62,319,992B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->64.05% (62,209,952B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->64.05% (62,209,952B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->64.05% (62,209,952B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->63.43% (61,608,456B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->63.43% (61,607,896B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->63.43% (61,607,896B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->63.43% (61,607,896B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->63.43% (61,607,896B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->63.43% (61,607,896B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.62% (601,496B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.11% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.04% (34,944B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.17% (168,224B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.42% (1,376,133B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->02.13% (2,069,520B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.56% (1,511,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.56% (1,511,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.57% (558,240B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.22% (1,185,780B) in 17 places, all below massif's threshold (1.00%)
|   
->09.74% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->09.74% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->09.74% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->09.74% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->09.74% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->09.74% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->09.74% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->09.74% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->09.74% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->09.74% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->09.74% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->09.74% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->09.73% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->09.73% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->09.73% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->09.73% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->01.52% (1,473,071B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 30 12,927,722,518      101,048,024       81,139,482    19,908,542            0
 31 13,515,755,717      105,111,920       84,300,290    20,811,630            0
 32 14,128,313,236      109,337,944       87,589,548    21,748,396            0
 33 14,443,921,159      111,517,888       89,285,060    22,232,828            0
 34 14,765,134,329      113,741,344       91,014,384    22,726,960            0
 35 15,093,820,753      116,007,880       92,779,614    23,228,266            0
 36 15,429,333,632      118,319,136       94,577,250    23,741,886            0
 37 15,801,888,721      120,891,416       96,577,846    24,313,570            0
79.89% (96,577,846B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->70.83% (85,632,639B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->68.12% (82,346,691B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->66.97% (80,956,176B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->66.83% (80,787,616B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->66.80% (80,751,496B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->66.71% (80,641,456B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->66.71% (80,641,456B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->66.71% (80,641,456B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->66.19% (80,021,816B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->66.19% (80,021,256B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->66.19% (80,021,256B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->66.19% (80,021,256B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->66.19% (80,021,256B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->66.19% (80,021,256B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.51% (619,640B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.09% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.03% (36,120B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.14% (168,560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.15% (1,390,515B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->01.73% (2,094,120B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.25% (1,514,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.25% (1,514,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.48% (579,840B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->00.99% (1,191,828B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->07.82% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->07.82% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->07.82% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->07.82% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->07.82% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->07.82% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->07.82% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->07.82% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->07.82% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->07.82% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->07.82% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->07.82% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->07.82% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->07.82% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->07.82% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->07.82% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->01.23% (1,489,139B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 38 16,151,130,582      123,298,976       98,452,784    24,846,192            0
 39 16,695,600,319      127,058,416      101,376,752    25,681,664            0
79.79% (101,376,752B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->71.17% (90,426,241B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->68.57% (87,130,077B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->67.48% (85,734,768B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->67.34% (85,566,096B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->67.32% (85,529,584B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->67.23% (85,419,544B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->67.23% (85,419,544B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->67.23% (85,419,544B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->66.74% (84,793,856B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->66.74% (84,793,296B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->66.74% (84,793,296B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->66.74% (84,793,296B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->66.74% (84,793,296B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->66.74% (84,793,296B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.49% (625,688B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.09% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.03% (36,512B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.13% (168,672B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.10% (1,395,309B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->01.65% (2,102,320B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.19% (1,515,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.19% (1,515,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.46% (587,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->00.94% (1,193,844B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->07.44% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->07.44% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->07.44% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->07.44% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->07.44% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->07.44% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->07.44% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->07.44% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->07.44% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->07.44% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->07.44% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->07.44% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->07.44% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->07.44% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->07.44% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->07.44% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->01.18% (1,494,443B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 40 17,066,182,604      129,612,576      103,365,702    26,246,874            0
79.75% (103,365,702B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->71.30% (92,410,043B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->68.75% (89,103,663B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->67.67% (87,703,560B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->67.54% (87,534,776B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->67.51% (87,497,872B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->67.42% (87,387,832B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->67.42% (87,387,832B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->67.42% (87,387,832B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->66.93% (86,756,096B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->66.93% (86,755,536B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->66.93% (86,755,536B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->66.93% (86,755,536B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->66.93% (86,755,536B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->66.93% (86,755,536B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.49% (631,736B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.08% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.03% (36,904B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.13% (168,784B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.08% (1,400,103B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->01.63% (2,110,520B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.17% (1,516,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.17% (1,516,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.46% (594,240B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->00.92% (1,195,860B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->07.30% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->07.30% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->07.30% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->07.30% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->07.30% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->07.30% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->07.30% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->07.30% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->07.30% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->07.30% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->07.30% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->07.30% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->07.29% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->07.29% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->07.29% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->07.29% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->01.16% (1,499,591B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 41 17,443,428,150      132,217,920      105,392,050    26,825,870            0
79.71% (105,392,050B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->71.42% (94,436,235B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->68.92% (91,129,855B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->67.87% (89,729,752B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->67.74% (89,560,968B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->67.71% (89,524,064B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->67.63% (89,414,024B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->67.63% (89,414,024B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->67.63% (89,414,024B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->67.15% (88,782,288B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->67.15% (88,781,728B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->67.15% (88,781,728B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->67.15% (88,781,728B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->67.15% (88,781,728B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->67.15% (88,781,728B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.48% (631,736B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.08% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.03% (36,904B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.13% (168,784B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->01.06% (1,400,103B) in 9 places, all below massif's threshold (1.00%)
| |   
| ->01.60% (2,110,520B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.15% (1,516,280B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.15% (1,516,280B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.45% (594,240B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->00.90% (1,195,860B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->07.15% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->07.15% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->07.15% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->07.15% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->07.15% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->07.15% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->07.15% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->07.15% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->07.15% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->07.15% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->07.15% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->07.15% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->07.15% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->07.15% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->07.15% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->07.15% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->01.13% (1,499,747B) in 322 places, all below massif's threshold (1.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 42 17,808,364,857      134,739,600      107,353,418    27,386,182            0
 43 18,197,476,352      137,422,448      109,442,412    27,980,036            0
 44 18,594,405,118      140,156,072      111,568,604    28,587,468            0
 45 18,999,428,575      142,948,856      113,743,090    29,205,766            0
 46 19,412,344,420      145,806,024      115,965,342    29,840,682            0
 47 19,833,356,231      148,705,808      118,220,750    30,485,058            0
 48 20,264,228,895      151,672,136      120,530,232    31,141,904            0
 49 20,751,474,323      155,037,032      123,147,312    31,889,720            0
79.43% (123,147,312B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->72.35% (112,175,585B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->70.20% (108,838,557B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->69.29% (107,424,072B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->69.18% (107,254,952B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->69.16% (107,216,872B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->69.08% (107,106,832B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->69.08% (107,106,832B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->69.08% (107,106,832B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->68.67% (106,456,952B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->68.67% (106,456,392B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->68.67% (106,456,392B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->68.67% (106,456,392B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->68.67% (106,456,392B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->68.67% (106,456,392B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.42% (649,880B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.07% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.02% (38,080B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.11% (169,120B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->00.91% (1,414,485B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.38% (2,135,120B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.38% (2,135,120B) in 21 places, all below massif's threshold (1.00%)
| |   
| ->00.78% (1,201,908B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->06.10% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->06.10% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->06.10% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->06.10% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->06.10% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->06.10% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->06.10% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->06.10% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->06.10% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->06.10% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->06.10% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->06.10% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->06.10% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->06.10% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->06.10% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->06.10% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->00.98% (1,515,659B) in 1+ places, all below ms_print's threshold (01.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 50 20,975,756,717      156,587,480      124,353,216    32,234,264            0
79.41% (124,353,216B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->72.41% (113,381,489B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->70.28% (110,044,461B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->69.37% (108,629,976B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->69.27% (108,460,856B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->69.24% (108,422,776B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->69.17% (108,312,736B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->69.17% (108,312,736B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->69.17% (108,312,736B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->68.76% (107,662,856B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->68.76% (107,662,296B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->68.76% (107,662,296B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->68.76% (107,662,296B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->68.76% (107,662,296B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->68.76% (107,662,296B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.42% (649,880B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.07% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.02% (38,080B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.11% (169,120B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->00.90% (1,414,485B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.36% (2,135,120B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.36% (2,135,120B) in 21 places, all below massif's threshold (1.00%)
| |   
| ->00.77% (1,201,908B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->06.04% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->06.04% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->06.04% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->06.04% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->06.04% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->06.04% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->06.04% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->06.04% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->06.04% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->06.04% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->06.04% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->06.04% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->06.04% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->06.04% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->06.04% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->06.04% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->00.97% (1,515,659B) in 1+ places, all below ms_print's threshold (01.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 51 21,203,201,416      158,153,360      125,573,498    32,579,862            0
79.40% (125,573,498B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->72.46% (114,596,467B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->70.34% (111,249,223B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->69.45% (109,829,944B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->69.34% (109,660,712B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->69.31% (109,622,240B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->69.24% (109,512,200B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->69.24% (109,512,200B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->69.24% (109,512,200B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->68.83% (108,856,272B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->68.83% (108,855,712B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->68.83% (108,855,712B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->68.83% (108,855,712B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->68.83% (108,855,712B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->68.83% (108,855,712B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.41% (655,928B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.07% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.02% (38,472B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.11% (169,232B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->00.90% (1,419,279B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.36% (2,143,320B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.36% (2,143,320B) in 21 places, all below massif's threshold (1.00%)
| |   
| ->00.76% (1,203,924B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->05.98% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->05.98% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->05.98% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->05.98% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->05.98% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->05.98% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->05.98% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->05.98% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->05.98% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->05.98% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->05.98% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->05.98% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->05.98% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->05.98% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->05.98% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->05.98% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->00.96% (1,520,963B) in 1+ places, all below ms_print's threshold (01.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 52 21,432,037,806      159,732,848      126,802,050    32,930,798            0
 53 21,432,276,252      159,734,984      126,803,650    32,931,334            0
79.38% (126,803,650B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->72.51% (115,826,619B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->70.42% (112,479,375B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->69.53% (111,060,096B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->69.42% (110,890,864B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->69.40% (110,852,392B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->69.33% (110,742,352B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->69.33% (110,742,352B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->69.33% (110,742,352B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->68.92% (110,086,424B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->68.92% (110,085,864B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->68.92% (110,085,864B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->68.92% (110,085,864B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->68.92% (110,085,864B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->68.92% (110,085,864B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.41% (655,928B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.07% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.02% (38,472B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.11% (169,232B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->00.89% (1,419,279B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.34% (2,143,320B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.34% (2,143,320B) in 21 places, all below massif's threshold (1.00%)
| |   
| ->00.75% (1,203,924B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->05.92% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->05.92% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->05.92% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->05.92% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->05.92% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->05.92% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->05.92% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->05.92% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->05.92% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->05.92% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->05.92% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->05.92% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->05.92% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->05.92% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->05.92% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->05.92% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->00.95% (1,520,963B) in 1+ places, all below ms_print's threshold (01.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 54 21,661,109,366      161,309,736      128,028,498    33,281,238            0
 55 21,664,328,972      161,332,376      128,046,066    33,286,310            0
79.37% (128,046,066B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->72.56% (117,069,035B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->70.49% (113,721,791B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->69.61% (112,302,512B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->69.50% (112,133,280B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->69.48% (112,094,808B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->69.41% (111,984,768B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->69.41% (111,984,768B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->69.41% (111,984,768B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->69.01% (111,328,840B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->69.01% (111,328,280B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->69.01% (111,328,280B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->69.01% (111,328,280B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->69.01% (111,328,280B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->69.01% (111,328,280B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.41% (655,928B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.07% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.02% (38,472B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.10% (169,232B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->00.88% (1,419,279B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.33% (2,143,320B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.33% (2,143,320B) in 21 places, all below massif's threshold (1.00%)
| |   
| ->00.75% (1,203,924B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->05.86% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->05.86% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->05.86% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->05.86% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->05.86% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->05.86% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->05.86% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->05.86% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->05.86% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->05.86% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->05.86% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->05.86% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->05.86% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->05.86% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->05.86% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->05.86% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->00.94% (1,520,963B) in 1+ places, all below ms_print's threshold (01.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 56 21,846,490,936      162,948,832      129,379,472    33,569,360            0
79.40% (129,379,472B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->72.62% (118,330,058B) 0x809B270: luaM_realloc_ (lmem.c:84)
| ->70.33% (114,604,590B) 0x8099797: luaC_newobj (lgc.c:215)
| | ->69.41% (113,107,568B) 0x809FE36: luaH_new (ltable.c:369)
| | | ->69.30% (112,927,248B) 0x80A2F36: luaV_execute (lvm.c:603)
| | | | ->69.28% (112,887,376B) 0x8096F9C: luaD_call (ldo.c:402)
| | | | | ->69.21% (112,777,336B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
| | | | | | ->69.21% (112,777,336B) 0x80971FF: luaD_pcall (ldo.c:603)
| | | | | |   ->69.21% (112,777,336B) 0x809309F: lua_pcallk (lapi.c:949)
| | | | | |     ->68.72% (111,972,448B) 0x130A1D: signal_object_emit (lualib.h:75)
| | | | | |     | ->68.72% (111,971,888B) 0x125033: luaA_emit_refresh (luaa.c:1024)
| | | | | |     | | ->68.72% (111,971,888B) 0x11A30F: a_glib_poll (event.h:53)
| | | | | |     | |   ->68.72% (111,971,888B) 0x551C437: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |     ->68.72% (111,971,888B) 0x551C7D0: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
| | | | | |     | |       ->68.72% (111,971,888B) 0x11BC2B: main (awesome.c:834)
| | | | | |     | |         
| | | | | |     | ->00.00% (560B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     | 
| | | | | |     ->00.49% (804,888B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | |     
| | | | | ->00.07% (110,040B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | | 
| | | | ->00.02% (39,872B) in 1+ places, all below ms_print's threshold (01.00%)
| | | | 
| | | ->00.11% (180,320B) in 1+ places, all below ms_print's threshold (01.00%)
| | | 
| | ->00.92% (1,497,022B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->01.54% (2,508,680B) 0x80A0328: luaH_resize (ltable.c:291)
| | ->01.04% (1,696,680B) 0x80A0794: luaH_newkey (ltable.c:358)
| | | ->01.04% (1,696,680B) in 5 places, all below massif's threshold (1.00%)
| | |   
| | ->00.50% (812,000B) in 1+ places, all below ms_print's threshold (01.00%)
| | 
| ->00.75% (1,216,788B) in 1+ places, all below ms_print's threshold (01.00%)
| 
->05.80% (9,456,068B) 0x505EFE1: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
| ->05.80% (9,456,068B) 0xF9A1A76: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
|   ->05.80% (9,456,068B) 0x5063C90: gdk_pixbuf_new_from_file (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3611.0)
|     ->05.80% (9,456,068B) 0x98E4FCC: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|       ->05.80% (9,456,068B) 0x98E493D: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
|         ->05.80% (9,456,068B) 0xDC6984F: ??? (in /usr/lib/x86_64-linux-gnu/liblua5.2-lgi.so.0.0.0)
|           ->05.80% (9,456,068B) 0x8096C73: luaD_precall (ldo.c:319)
|             ->05.80% (9,456,068B) 0x80A2823: luaV_execute (lvm.c:709)
|               ->05.80% (9,456,068B) 0x8096F9C: luaD_call (ldo.c:402)
|                 ->05.80% (9,456,068B) 0x80965CD: luaD_rawrunprotected (ldo.c:131)
|                   ->05.80% (9,456,068B) 0x80971FF: luaD_pcall (ldo.c:603)
|                     ->05.80% (9,456,068B) 0x809309F: lua_pcallk (lapi.c:949)
|                       ->05.80% (9,453,568B) 0x123BD3: luaA_loadrc (luaa.c:926)
|                       | ->05.80% (9,453,568B) 0x124DB2: luaA_find_config (luaa.c:969)
|                       |   ->05.80% (9,453,568B) 0x124F76: luaA_parserc (luaa.c:952)
|                       |     ->05.80% (9,453,568B) 0x11B6D6: main (awesome.c:814)
|                       |       
|                       ->00.00% (2,500B) in 1+ places, all below ms_print's threshold (01.00%)
|                       
->00.98% (1,593,346B) in 1+ places, all below ms_print's threshold (01.00%)

--------------------------------------------------------------------------------
  n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)
--------------------------------------------------------------------------------
 57 22,075,323,996       78,740,944       61,519,319    17,221,625            0

== urxvt containing 500x400 + lots of clicks == Not measured yet and due to the results above: Will not be measured.

== urxvt containing 500x400 + just wait 17 minutes == Not measured yet and due to the results above: Will not be measured.

psychon commented 6 years ago

https://sources.debian.org/src/xdotool/1:3.20160805.1-3/xdo.c/?hl=934#L934 Uhm, xdotool leaves the button down for DEFAULT_DELAY = 12 milliseconds. So we are talking about 13 milliseconds per iterations, which means three and a half hours in total. Plus whatever time xdotool needs between those usleep calls. That's ridiculously long. Please tell me my math is wrong!

Edit: Since xdotool just finished after 20 minutes, something must be wrong with my three hours estimate.

psychon commented 6 years ago

Here is a simple patch to awesome's C code that can be used to reproduce the "problem" (this just needs the refresh signal to be emitted, so this patch does a million main loop iterations):

diff --git a/awesome.c b/awesome.c
index 3513cecf4..3edcba99c 100644
--- a/awesome.c
+++ b/awesome.c
@@ -501,6 +501,15 @@ exit_help(int exit_code)
     exit(exit_code);
 }

+static gboolean
+do_some_loops(gpointer unused)
+{
+    static int iterations = 0;
+    if (iterations++ > 1000000)
+        g_main_loop_quit(globalconf.loop);
+    return G_SOURCE_CONTINUE;
+}
+
 /** Hello, this is main.
  * \param argc Who knows.
  * \param argv Who knows.
@@ -530,6 +539,8 @@ main(int argc, char **argv)
         { NULL,      0, NULL, 0 }
     };

+    g_idle_add(do_some_loops, NULL);
+
     /* Make stdout/stderr line buffered. */
     setvbuf(stdout, NULL, _IOLBF, 0);
     setvbuf(stderr, NULL, _IOLBF, 0);

and this patch gets rid of the "problem":

diff --git a/lib/gears/timer.lua b/lib/gears/timer.lua
index 3f88d70a3..059305fe1 100644
--- a/lib/gears/timer.lua
+++ b/lib/gears/timer.lua
@@ -227,6 +227,7 @@ end

 local delayed_calls = {}
 capi.awesome.connect_signal("refresh", function()
+    if #delayed_calls == 0 then return end
     for _, callback in ipairs(delayed_calls) do
         protected_call(unpack(callback))
     end

The patch just gets rid of a trivial memory allocation in Lua. However, since this is quite a synthetic test, I do not think we should try to avoid memory allocations too much for it. If someone were to submit this patch (with proper line breaks around the return) as a PR, I would not mind it, but I won't submit a PR myself. Completely idle main loop iterations are just some special case that I do not think is worth optimising for. This is a garbage collected language and the garbage collector should, well, collect garbage.

psychon commented 6 years ago

Here is a self-contained reproducing example. @pmasterc3 Do you want to send this to lua-l and ask for comments?

#include <lualib.h>
#include <lauxlib.h>

static const char code[] = "local a = {} callback(function() for _ in ipairs(a) do end a = {} end)";
static int callback_ref = LUA_REFNIL;

int callback(lua_State *L)
{
    luaL_argcheck(L, lua_type(L, 1) == LUA_TFUNCTION, 1, "not a function");
    luaL_argcheck(L, callback_ref == LUA_REFNIL, 1, "already called before");
    callback_ref = luaL_ref(L, LUA_REGISTRYINDEX);
    return 0;
}

int main()
{
    lua_State *L = luaL_newstate();
    luaL_openlibs(L);

    lua_pushcfunction(L, callback);
    lua_setglobal(L, "callback");

    if (luaL_dostring(L, code) != 0)
        fprintf(stderr, "luaL_dostring failed: %s", lua_tostring(L, -1));

    for (int i = 0; i < 10000000; i++) {
        lua_rawgeti(L, LUA_REGISTRYINDEX, callback_ref);
        lua_call(L, 0, 0);
    }

    /* Skip this so that massif only includes the results of the code above.
    lua_close(L);
    */
    return 0;
}

Result with Lua 5.1:

    KB
99.07^#                                                                       
     |#  ::                 ::      :                     : :     @  :    :  :
     |#  :             :    :       :                     : :  :  @  :  : :  :
     |#  :             :  : :      @:   : @ : @           : :: :  @  : :: :  :
     |#  :      :      :  :::      @:   : @ : @           : :: :  @: : :: :: :
     |#  :      :  :   :  :::    : @:: :::@:::@: : : : :  : :: :: @: : :@ :: :
     |#: @ :    : ::   :  :::   :::@:: :::@:::@: : : : :  : ::::: @: :::@ :: :
     |#  @ :   :: ::   ::::::  ::::@::::::@:::@: : : : :  ::::::: @: :::@ ::::
     |# :@ ::  ::@::  ::: :::  ::::@::::::@:::@:::::::::: ::::::::@: :::@:::::
     |# :@ ::  ::@::::::: ::: :::::@::::::@:::@:::::::::: ::::::::@: :::@:::::
     |# :@ ::  ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::::::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
     |# :@ ::: ::@::: ::: ::: :::::@::::::@:::@:::::::::::::@:::::@:::::@:::::
   0 +----------------------------------------------------------------------->Gi
     0                                                                   16.16

Result with Lua 5.2:

    MB
684.2^                                                                       :
     |                                                                    ::::
     |                                                                 :::: ::
     |                                                             :::::::: ::
     |                                                          @::: :::::: ::
     |                                                      ::::@: : :::::: ::
     |                                                  :::::: :@: : :::::: ::
     |                                                ::: : :: :@: : :::::: ::
     |                                            ::::::: : :: :@: : :::::: ::
     |                                        :::@: : ::: : :: :@: : :::::: ::
     |                                     ::::: @: : ::: : :: :@: : :::::: ::
     |                                ::::::: :: @: : ::: : :: :@: : :::::: ::
     |                            :@@:: :: :: :: @: : ::: : :: :@: : :::::: ::
     |                          :::@ :: :: :: :: @: : ::: : :: :@: : :::::: ::
     |                      ::@@:::@ :: :: :: :: @: : ::: : :: :@: : :::::: ::
     |                  @:::: @ :::@ :: :: :: :: @: : ::: : :: :@: : :::::: ::
     |               :::@: :: @ :::@ :: :: :: :: @: : ::: : :: :@: : :::::: ::
     |           @:::: :@: :: @ :::@ :: :: :: :: @: : ::: : :: :@: : :::::: ::
     |       ::::@: :: :@: :: @ :::@ :: :: :: :: @: : ::: : :: :@: : :::::: ::
     |    :::: : @: :: :@: :: @ :::@ :: :: :: :: @: : ::: : :: :@: : :::::: ::
   0 +----------------------------------------------------------------------->Gi
     0                                                                   13.42

Result with Lua 5.3:

    MB
683.8^                                                                       :
     |                                                                    :::@
     |                                                                 ::::: @
     |                                                              ::::: :: @
     |                                                          :::::: :: :: @
     |                                                      ::::: : :: :: :: @
     |                                                   @@::: :: : :: :: :: @
     |                                                :::@ ::: :: : :: :: :: @
     |                                           ::@:::: @ ::: :: : :: :: :: @
     |                                        :::: @: :: @ ::: :: : :: :: :: @
     |                                    :::@: :: @: :: @ ::: :: : :: :: :: @
     |                                @::::: @: :: @: :: @ ::: :: : :: :: :: @
     |                            ::::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
     |                          @:: ::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
     |                     :::::@:: ::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
     |                   :::: ::@:: ::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
     |              :::::: :: ::@:: ::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
     |           :::: :: : :: ::@:: ::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
     |        ::::: : :: : :: ::@:: ::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
     |    :::::: :: : :: : :: ::@:: ::@: ::: @: :: @: :: @ ::: :: : :: :: :: @
   0 +----------------------------------------------------------------------->Gi
     0                                                                   12.77

So apparently this is a bug in Lua that was introduced between Lua 5.1 and Lua 5.2.

psychon commented 6 years ago

With the above test case, I did a git bisect with the git repository from https://github.com/lua/lua. The result is:

51e8f08e609b20af6f70641855d9be5edb2f1328 is the first bad commit
commit 51e8f08e609b20af6f70641855d9be5edb2f1328
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon May 28 17:41:00 2012 -0300

    more efficient way to apply 'stepmul' + some changes in GC parameters

:100644 100644 fc888d0497ef93e4916972b43b4cc41f1424d72f 64e8df97c0279a9164c89b71f1f58104d5f7278a M  lgc.c

Commit 51e8f08e plus the following patch does not have this problem:

diff --git a/lgc.c b/lgc.c
index 64e8df97..6934be2a 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1098,7 +1098,10 @@ static void step (lua_State *L) {
   debt = (debt / STEPMULADJ) + 1;
   debt = (debt < MAX_LMEM / stepmul) ? debt * stepmul : MAX_LMEM;
   do {  /* always perform at least one single step */
+#define workrate(x,mul)  \
+       ((x) < MAX_INT/80 ? ((x) * 80) / mul : ((x) / mul) * 80)
     lu_mem work = singlestep(L);  /* do some work */
+    work = workrate(work, stepmul);
     debt -= work;
   } while (debt > -GCSTEPSIZE && g->gcstate != GCSpause);
   if (g->gcstate == GCSpause)

With random modifications, I came up with: Lua 5.3.0 plus the following patch also does not have this problem.

diff --git a/lgc.c b/lgc.c
index 185c1d8c..d73256a7 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1115,6 +1115,7 @@ void luaC_step (lua_State *L) {
   }
   do {  /* repeat until pause or enough "credit" (negative debt) */
     lu_mem work = singlestep(L);  /* perform one single step */
+    work -= 30;
     debt -= work;
   } while (debt > -GCSTEPSIZE && g->gcstate != GCSpause);
   if (g->gcstate == GCSpause)

So somewhere Lua's garbage collector is mis-estimating the amount of work it did.

psychon commented 6 years ago

Never mind, this problem was already fixed in Lua's git by the following commit:

commit 7b1fba69b7a887e37e57744309299d134e76e06e (HEAD, refs/bisect/bad)
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon Nov 7 10:38:35 2016 -0200

    using 'lastfree == NULL' to signal that table is using the dummy
    node for its hash part + new macro 'allocsizenode'

Thus, no point in talking to the Lua devs about this. According to git describe, the above commit is 23 commits after Lua 5.3.3 and already part of Lua 5.3.4. Thus, we just have to wait for Debian to update its Lua version and I will close this.

psychon commented 6 years ago

Well, okay. You might want to report this to Debian so that they update to Lua 5.3.4. It seems like no one is working on that so far.

Edit: And just a FYI on what was going on: Apparently, previously the Lua GC considered the size of an empty table to be 1 << 0 higher than it was. (lsizenode was set to 0 in setnodevector and the GC used sizenode to estimate the size of the hash part of the table, which is defined to be 1 << lsizenode; thus the GC wrongly estimated one "unit" for the size of the hash part when in reality there was no hash part allocated. This lead to the GC being slower than the memory allocation and thus the run away memory usage.)

pmasterc3 commented 6 years ago

Thanks for the quick response!