Surya.Prakki at Sun.COM
2006-Oct-27 12:02 UTC
[dtrace-discuss] Using hm_pad2 confuses dscript ??
I am chasing down a hment_remove panic on an amd64 system. As I am suspecting hment corruption, I thought of tracking the PFNs in hm_pad2 field of ''struct hment'' as this might improve my chances of detecting any inconsisteny in hme list earlier. With that in mind, I added the following line to hment_insert() : #ifdef __amd64 hm->hm_pad2 = (uint32_t) pp->p_pagenum; #endif immediately after : pp->p_mapping = hm; One of the probes in my D-script is: hment_remove:entry /self->rel/ { printf("ts: %lu pp: %p emb: %x ht: %p", timestamp, arg0, args[0]->p_embed, arg1); } When I run DTrace on the amd64 system with the above change (both unix and genunix built and copied), the page structure pointer that DTrace prints is off by a few bytes from the actual value (once it was 0x20bytes; once it was way off ~0x100bytes). I haven''t checked whether other structure pointers are ok(for example: htable). If I get rid off the hm_pad2 assignment, it works fine. What am I missing here? thanks, surya PS: System is s10 118855-19
It could be that the CTF data is corrupt since you''re copying some, but not all kernel modules. You can use mdb -k to examine the offsets for page_t to confirm that they''re what you expect. You can also run DTrace with the -S flag to see the DIF disassembly output; check this for the correct page_t offsets. Adam On Fri, Oct 27, 2006 at 05:32:04PM +0530, Surya.Prakki at Sun.COM wrote:> I am chasing down a hment_remove panic on an amd64 system. > As I am suspecting hment corruption, I thought of tracking > the PFNs in hm_pad2 field of ''struct hment'' as this might > improve my chances of detecting any inconsisteny in hme list > earlier. > > With that in mind, I added the following line to > hment_insert() : > > #ifdef __amd64 > hm->hm_pad2 = (uint32_t) pp->p_pagenum; > #endif > > immediately after : > pp->p_mapping = hm; > > One of the probes in my D-script is: > > hment_remove:entry > /self->rel/ > { > printf("ts: %lu pp: %p emb: %x ht: %p", timestamp, arg0, > args[0]->p_embed, arg1); > } > > When I run DTrace on the amd64 system with the above change > (both unix and genunix built and copied), the page structure > pointer that DTrace prints is off by a few bytes from the actual > value (once it was 0x20bytes; once it was way off ~0x100bytes). > > I haven''t checked whether other structure pointers are ok(for > example: htable). > > If I get rid off the hm_pad2 assignment, it works fine. > What am I missing here? > > thanks, > surya > PS: System is s10 118855-19 > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl