mem trace with thread id