Extra sampling of record function events (#48289)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48289
Adding extra sampling step when dispatching RecordFunction.
(Note: this ignores all push blocking failures!)
Reviewed By: swolchok
Differential Revision: D25111515
Pulled By: ilia-cher
fbshipit-source-id: 0d572a3636fe649a47ec47901826bbfc08368937