Copied trace functions to 1.8.12 dir