[ftrace] Add event-based stat to db.