add memory change trace