For commercial solution I recommend Intel VTune. It can do that and much more.
There is free tool from AMD called CodeXL. Not as good as Intel one, but still works great. It works fine on Intel CPU's, but I am not sure if it will show L2 cache usage on non-AMD CPU's. Some time ago it was showing only basic info if run on non-AMD CPU.