summaryrefslogtreecommitdiff
path: root/frontends/amiga/arexx.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-11-27 17:10:03 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-11-27 17:10:03 +0000
commit0bc32aa654271fd592d36fabf272e3fa0ca0a450 (patch)
tree3fadc9b2700f9dea38c271a440cbbd9e33bda2b7 /frontends/amiga/arexx.c
parent4fb38f574a303d53fb3e4560e76163e4e97687b3 (diff)
downloadnetsurf-0bc32aa654271fd592d36fabf272e3fa0ca0a450.tar.gz
netsurf-0bc32aa654271fd592d36fabf272e3fa0ca0a450.tar.bz2
Add more clib2 stats
JSON formatted data can now be saved with ARexx "SLABSTATS stats.json"
Diffstat (limited to 'frontends/amiga/arexx.c')
-rw-r--r--frontends/amiga/arexx.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c
index 18dae24d1..b9702287b 100644
--- a/frontends/amiga/arexx.c
+++ b/frontends/amiga/arexx.c
@@ -118,7 +118,7 @@ STATIC struct ARexxCmd Commands[] =
{"ACTIVE", RX_ACTIVE, rx_active, "T=TAB/S", 0, NULL, 0, 0, NULL },
{"CLOSE", RX_CLOSE, rx_close, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"HOTLIST", RX_HOTLIST, rx_hotlist, "A=ACTION/A", 0, NULL, 0, 0, NULL },
- {"SLABSTATS", RX_SLABSTATS, rx_slabstats, NULL, 0, NULL, 0, 0, NULL },
+ {"SLABSTATS", RX_SLABSTATS, rx_slabstats, "FILE", 0, NULL, 0, 0, NULL },
{ NULL, 0, NULL, NULL, 0, NULL, 0, 0, NULL }
};
@@ -674,7 +674,14 @@ RXHOOKF(rx_hotlist)
RXHOOKF(rx_slabstats)
{
#ifndef __amigaos4__
- ami_memory_slab_dump();
+ BPTR fh = 0;
+
+ if(cmd->ac_ArgList[0] != NULL) {
+ fh = Open((char *)cmd->ac_ArgList[0], MODE_NEWFILE);
+ }
+ ami_memory_slab_dump(fh);
+
+ if(fh != 0) Close(fh);
#endif
}