[ftrace] Add pid and make trace-db.py store data to db.