sched_switch event defined in the metadata helps to identify if the thread is running or idle
sched_switch looks like this:
A thread can have following types of state:
How to detect if the thread is idle or not?
If thread API returns 1 then it means it is idle thread.
If above condtion returns 1 then it is idle thread. For idle thread _prev_tid of sched_switch
value is 0.