Revert "Capture non tensor arguments in record_function (#120017)"
This reverts commit 5c5b71b6eebae76d744261715231093e62f0d090.
Reverted https://github.com/pytorch/pytorch/pull/120017 on behalf of https://github.com/soulitzer due to regresses perf on autograd Function when using profiler ([comment](https://github.com/pytorch/pytorch/pull/120017#issuecomment-1969883792))