Checking number of contexts in a program

I would like to check the number of contexts (ctx) in a program. I was thinking that it is possible to have either one ctx with multiple consecutive kernel calls or one kernel with multiple ctxs. However, I don’t know how to find the answer for a program. How can I check that with the profiler? Which information should I look for?

The profiler will show different contexts as different rows in the profiler timeline output.