Reapply "[jit] Implement ScriptProfile to collect instruction profiles." (#58783)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58783
This reverts commit fc804b5def5e7d7ecad24c4d1ca4ac575e588ae8.
Test Plan: Imported from OSS
Reviewed By: gmagogsfm
Differential Revision: D28617037
Pulled By: zhxchen17
fbshipit-source-id: 645de2ede20500a5c218d6ec3c7faae94de37a14