Author: Darryl Gove

A while back I wrote up how to use dtrace to identify misaligned loads in 32-bit apps. Here’s a script to do the same for 64-bit apps:

#!/usr/sbin/dtrace -s
pid$1::__do_misaligned_ldst_instr:entry
{
  @p[ustack()]=count();
} 

Run it as ‘./script ‘