update trace func