From 0bc32aa654271fd592d36fabf272e3fa0ca0a450 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 27 Nov 2016 17:10:03 +0000 Subject: Add more clib2 stats JSON formatted data can now be saved with ARexx "SLABSTATS stats.json" --- frontends/amiga/arexx.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'frontends/amiga/arexx.c') 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 } -- cgit v1.2.3