Enable callgrind collection for C++ snippets (#47865)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/47865
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D25199264
Pulled By: robieta
fbshipit-source-id: 529244054e4cc01e4703b7b9720833d991452943