Patches for check_mem with perf data [sf#1201050] [#594]