diff --git a/samples/lj-bucket-depth-accessed.sxx b/samples/lj-bucket-depth-accessed.sxx index 1ca42c9..636c465 100755 --- a/samples/lj-bucket-depth-accessed.sxx +++ b/samples/lj-bucket-depth-accessed.sxx @@ -5,7 +5,7 @@ global stats probe process("$^libluajit_path").statement("*@lj_str.c:161") { - bucket = &$g->strhash[$h & $g->strmask] + bucket = &$g->str->tab[$h & $g->str->mask] stats <<< luajit_bucket_depth(bucket) //printf("depth = %d\n", depth) //exit() diff --git a/samples/lj-gc-objs.sxx b/samples/lj-gc-objs.sxx index 36d258e..acf5929 100755 --- a/samples/lj-gc-objs.sxx +++ b/samples/lj-gc-objs.sxx @@ -93,9 +93,9 @@ function process(L) gcobjs[$*o->gch->gct] <<< size } - strmask = $*g->strmask - strnum = $*g->strnum - strhash = $*g->strhash + strmask = $*g->str->mask + strnum = $*g->str->num + strhash = $*g->str->tab $*strhash := @cast(strhash, "GCRef", "$^libluajit_path") n = 0 diff --git a/samples/lj-str-tab.sxx b/samples/lj-str-tab.sxx index 8b52c51..f8f0088 100755 --- a/samples/lj-str-tab.sxx +++ b/samples/lj-str-tab.sxx @@ -33,14 +33,14 @@ function process(L) g = luajit_G(L) $*g := @cast(g, "global_State", "$^libluajit_path") - strmask = $*g->strmask - strnum = $*g->strnum + strmask = $*g->str->mask + strnum = $*g->str->num printf("string count: %d\n", strnum) printf("bucket count: %d\n", strmask + 1) printf("load factor: %d%%\n\n", strnum * 100/(strmask + 1)) - strhash = $*g->strhash + strhash = $*g->str->tab $*strhash := @cast(strhash, "GCRef", "$^libluajit_path") n = 0 diff --git a/samples/luajit21-gc64/lj-gc-objs.sxx b/samples/luajit21-gc64/lj-gc-objs.sxx index de151d9..da03a5d 100755 --- a/samples/luajit21-gc64/lj-gc-objs.sxx +++ b/samples/luajit21-gc64/lj-gc-objs.sxx @@ -93,9 +93,9 @@ function process(L) gcobjs[$*o->gch->gct] <<< size } - strmask = $*g->strmask - strnum = $*g->strnum - strhash = $*g->strhash + strmask = $*g->str->mask + strnum = $*g->str->num + strhash = $*g->str->tab $*strhash := @cast(strhash, "GCRef", "$^libluajit_path") n = 0 diff --git a/tapset/luajit.sxx b/tapset/luajit.sxx index 57b3b0d..f3ef5da 100644 --- a/tapset/luajit.sxx +++ b/tapset/luajit.sxx @@ -59,7 +59,7 @@ $*pt := @cast(pt, "GCproto", "$^libluajit_path") @define sizeof_SnapShot %( &@cast(0, "SnapShot", "$^libluajit_path")[1] %) @define sizeof_SnapEntry %( &@cast(0, "SnapEntry", "$^libluajit_path")[1] %) @define sizeof_K64Array %( &@cast(0, "K64Array", "$^libluajit_path")[1] %) -@define sizeof_ptr %( &@cast(0, "global_State", "$^libluajit_path")->strmask %) +@define sizeof_ptr %( &@cast(0, "global_State", "$^libluajit_path")->str->mask %) @define sizeof_GCcdataVar %( &@cast(0, "GCcdataVar", "$^libluajit_path")[1] %) @define sizeof_BCIns %( &@cast(0, "BCIns", "$^libluajit_path")[1] %) @@ -771,9 +771,9 @@ function luajit_vm_state(g) function luajit_find_gcstr(g, str) { len = strlen(str) - strmask = $*g->strmask - strnum = $*g->strnum - strhash = $*g->strhash + strmask = $*g->str->mask + strnum = $*g->str->num + strhash = $*g->str->tab $*strhash := @cast(strhash, "GCRef", "$^libluajit_path") ret = 0 diff --git a/tapset/luajit_gc64.sxx b/tapset/luajit_gc64.sxx index b0b325f..c5f4e9e 100644 --- a/tapset/luajit_gc64.sxx +++ b/tapset/luajit_gc64.sxx @@ -63,7 +63,7 @@ $*pt := @cast(pt, "GCproto", "$^libluajit_path") @define sizeof_SnapShot %( &@cast(0, "SnapShot", "$^libluajit_path")[1] %) @define sizeof_SnapEntry %( &@cast(0, "SnapEntry", "$^libluajit_path")[1] %) @define sizeof_K64Array %( &@cast(0, "K64Array", "$^libluajit_path")[1] %) -@define sizeof_ptr %( &@cast(0, "global_State", "$^libluajit_path")->strmask %) +@define sizeof_ptr %( &@cast(0, "global_State", "$^libluajit_path")->str->mask %) @define sizeof_GCcdataVar %( &@cast(0, "GCcdataVar", "$^libluajit_path")[1] %) @define sizeof_BCIns %( &@cast(0, "BCIns", "$^libluajit_path")[1] %) @@ -787,9 +787,9 @@ function luajit_vm_state(g) function luajit_find_gcstr(g, str) { len = strlen(str) - strmask = $*g->strmask - strnum = $*g->strnum - strhash = $*g->strhash + strmask = $*g->str->mask + strnum = $*g->str->num + strhash = $*g->str->tab $*strhash := @cast(strhash, "GCRef", "$^libluajit_path") ret = 0