acid: fix dumptree() acid function to work in kernel debug, update malloc.acid and pool.acid files

This commit is contained in:
cinap_lenrek 2013-06-10 01:13:21 +02:00
parent 177c175fda
commit dfb0bf24b3
3 changed files with 155 additions and 46 deletions

View file

@ -246,9 +246,9 @@ gendumptree(f, in, s)
loop 1,in do {print(" ");}
print(s, " size ", f.size\D, " left ", f.left\X, " right ", f.right\X, "\n");
if f.left != 0 && f.left < 0x7FFFFFFF then
if f.left != 0 then
gendumptree(f.left, in+1, "l");
if f.right != 0 && f.right < 0x7FFFFFFF then
if f.right != 0 then
gendumptree(f.right, in+1, "r");
}

View file

@ -1,8 +1,8 @@
sizeof_1_ = 8;
aggr _1_
{
'D' 0 lo;
'D' 4 hi;
'U' 0 lo;
'U' 4 hi;
};
defn
@ -17,8 +17,8 @@ aggr FPdbleword
{
'F' 0 x;
{
'D' 0 lo;
'D' 4 hi;
'U' 0 lo;
'U' 4 hi;
};
};
@ -34,29 +34,57 @@ FPdbleword(addr) {
UTFmax = 3;
Runesync = 128;
Runeself = 128;
Runeerror = 128;
sizeofFconv = 24;
aggr Fconv
Runeerror = 65533;
Runemax = 65535;
Runemask = 65535;
sizeofFmt = 48;
aggr Fmt
{
'X' 0 out;
'X' 4 eout;
'D' 8 f1;
'D' 12 f2;
'D' 16 f3;
'D' 20 chr;
'b' 0 runes;
'X' 4 start;
'X' 8 to;
'X' 12 stop;
'X' 16 flush;
'X' 20 farg;
'D' 24 nfmt;
'X' 28 args;
'D' 32 r;
'D' 36 width;
'D' 40 prec;
'U' 44 flags;
};
defn
Fconv(addr) {
complex Fconv addr;
print(" out ", addr.out\X, "\n");
print(" eout ", addr.eout\X, "\n");
print(" f1 ", addr.f1, "\n");
print(" f2 ", addr.f2, "\n");
print(" f3 ", addr.f3, "\n");
print(" chr ", addr.chr, "\n");
Fmt(addr) {
complex Fmt addr;
print(" runes ", addr.runes, "\n");
print(" start ", addr.start\X, "\n");
print(" to ", addr.to\X, "\n");
print(" stop ", addr.stop\X, "\n");
print(" flush ", addr.flush\X, "\n");
print(" farg ", addr.farg\X, "\n");
print(" nfmt ", addr.nfmt, "\n");
print(" args ", addr.args\X, "\n");
print(" r ", addr.r, "\n");
print(" width ", addr.width, "\n");
print(" prec ", addr.prec, "\n");
print(" flags ", addr.flags, "\n");
};
FmtWidth = 1;
FmtLeft = 2;
FmtPrec = 4;
FmtSharp = 8;
FmtSpace = 16;
FmtSign = 32;
FmtZero = 64;
FmtUnsigned = 128;
FmtShort = 256;
FmtLong = 512;
FmtVLong = 1024;
FmtComma = 2048;
FmtByte = 4096;
FmtFlag = 8192;
sizeofTm = 40;
aggr Tm
{
@ -89,6 +117,11 @@ Tm(addr) {
PNPROC = 1;
PNGROUP = 2;
Profoff = 0;
Profuser = 1;
Profkernel = 2;
Proftime = 3;
Profsample = 4;
sizeofLock = 4;
aggr Lock
{
@ -159,6 +192,50 @@ RWLock(addr) {
print(" $tail ", addr.$tail\X, "\n");
};
sizeofRendez = 12;
aggr Rendez
{
'A' QLock 0 l;
'A' QLp 4 $head;
'A' QLp 8 $tail;
};
defn
Rendez(addr) {
complex Rendez addr;
print(" l ", addr.l\X, "\n");
print(" $head ", addr.$head\X, "\n");
print(" $tail ", addr.$tail\X, "\n");
};
sizeofNetConnInfo = 36;
aggr NetConnInfo
{
'X' 0 dir;
'X' 4 root;
'X' 8 spec;
'X' 12 lsys;
'X' 16 lserv;
'X' 20 rsys;
'X' 24 rserv;
'X' 28 laddr;
'X' 32 raddr;
};
defn
NetConnInfo(addr) {
complex NetConnInfo addr;
print(" dir ", addr.dir\X, "\n");
print(" root ", addr.root\X, "\n");
print(" spec ", addr.spec\X, "\n");
print(" lsys ", addr.lsys\X, "\n");
print(" lserv ", addr.lserv\X, "\n");
print(" rsys ", addr.rsys\X, "\n");
print(" rserv ", addr.rserv\X, "\n");
print(" laddr ", addr.laddr\X, "\n");
print(" raddr ", addr.raddr\X, "\n");
};
RFNAMEG = 1;
RFENVG = 2;
RFFDG = 4;
@ -305,26 +382,6 @@ Pool(addr) {
print(" private ", addr.private\X, "\n");
};
sizeofTraverse = 20;
aggr Traverse
{
'X' 0 visit;
'D' 4 maxvisit;
'X' 8 a;
'X' 12 b;
'X' 16 prev;
};
defn
Traverse(addr) {
complex Traverse addr;
print(" visit ", addr.visit\X, "\n");
print(" maxvisit ", addr.maxvisit, "\n");
print(" a ", addr.a\X, "\n");
print(" b ", addr.b\X, "\n");
print(" prev ", addr.prev\X, "\n");
};
complex Pool mainmem;
complex Pool imagmem;
POOL_ANTAGONISM = 1;
@ -333,11 +390,60 @@ POOL_VERBOSITY = 4;
POOL_DEBUGGING = 8;
POOL_LOGGING = 16;
POOL_TOLERANCE = 32;
sizeofPrivate = 8;
POOL_NOREUSE = 64;
sizeof_2_ = 24;
aggr _2_
{
'X' 0 pp;
'X' 4 next;
'X' 8 last;
'X' 12 first;
'U' 16 pid;
'U' 20 what;
};
defn
_2_(addr) {
complex _2_ addr;
print(" pp ", addr.pp\X, "\n");
print(" next ", addr.next\X, "\n");
print(" last ", addr.last\X, "\n");
print(" first ", addr.first\X, "\n");
print(" pid ", addr.pid, "\n");
print(" what ", addr.what, "\n");
};
sizeofTos = 56;
aggr Tos
{
_2_ 0 prof;
'W' 24 cyclefreq;
'V' 32 kcycles;
'V' 40 pcycles;
'U' 48 pid;
'U' 52 clock;
};
defn
Tos(addr) {
complex Tos addr;
print("_2_ prof {\n");
_2_(addr.prof);
print("}\n");
print(" cyclefreq ", addr.cyclefreq, "\n");
print(" kcycles ", addr.kcycles, "\n");
print(" pcycles ", addr.pcycles, "\n");
print(" pid ", addr.pid, "\n");
print(" clock ", addr.clock, "\n");
};
complex Tos _tos;
sizeofPrivate = 12;
aggr Private
{
Lock 0 lk;
'D' 4 printfd;
'D' 4 pid;
'D' 8 printfd;
};
defn
@ -346,6 +452,7 @@ Private(addr) {
print("Lock lk {\n");
Lock(addr.lk);
print("}\n");
print(" pid ", addr.pid, "\n");
print(" printfd ", addr.printfd, "\n");
};

View file

@ -35,6 +35,8 @@ UTFmax = 3;
Runesync = 128;
Runeself = 128;
Runeerror = 65533;
Runemax = 65535;
Runemask = 65535;
sizeofFmt = 48;
aggr Fmt
{
@ -503,7 +505,7 @@ complex Free checklist:t;
complex Free checklist:q;
complex Free checktree:t;
complex Free ltreewalk:t;
complex Free treelookup:t;
complex Free ltreewalk:f;
complex Free treeinsert:tree;
complex Free treeinsert:node;
complex Free treeinsert:loc;