In "Host Thread" tab of "GPU: Application Trace" profile run, we get OpenCL call history.
If you are looking for the call stack associated with a particular OpenCL call, do the following:
i. Change CodeXL mode to "Debug" by clicking on "D" icon or by "Debug -> Debug Mode".
ii. Click on "Debug -> Add/Remove Breakpoint" and add the desired OCL call as break point
iii. Click "F5" to start debugging.
iv. Once Break point is hit, "Call Stack" tab shows the desired call stack for the OCL call
Let us know if you need any other help in using CodeXL.
Thanks for your reply, Kalyan.
It is useful to do things the way you said in simple cases but not in my case. The exact same line containing the OpenCL call is in a class which is used thousands of times during program execution and I know that one of those class instances is leaking the OCL resource. Say it's the call numbered 12345 in the application trace. I then want to know the call stack above so I know how the class got called in the first place. Solutions I can think of are:
1) Be able to set an OpenCL breakpoint that is of the form "break on the 12345th OCL call";
2) Enable a full call stack to be logged for either all, or specific, OCL calls in the OCL application trace (my preference);
3) Somehow count the number of times an OCL call is made on a specific source line and report this. I could then set a conditional breakpoint on the number of times hit.
Do you see my problem?