[Pytorch] Fix callstack pointer serialization bug (#63576)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63576
We serialize function name associated with InlinedCallStackPtr. This is derived
via querying Function* stored in InlinedCallStack. However this is a raw
pointer that is not gauranteed to be valid when we serialization happens. On
the other hand we also store function name separately when constructing
InlinedCallStack anyways. So this change just uniformly relies on function_name
instead of Function*
Test Plan: Internal build's asan failure + CI
Reviewed By: larryliu0820
Differential Revision: D30427029
fbshipit-source-id: de9617482404785920ed2e67b72f38461590fba3