To use this, build pocl with the patch below and then run your OpenCL program with
POCL_DEBUG=memory
Since you'll be using a patched pocl, maybe you will need ocl-icd to see that. To get that to happen, you can use
this shell script. Save as, maybe, with-my-pocl
:
#! /bin/bash