Add processid to gen_trace.py and modify the gen_trace script