How to prevent Visual Studio 2015 Update 2 to add telemetry_main_invoke_trigger?

杀马特。学长 韩版系。学妹 提交于 2021-02-08 12:47:05

问题


A simple C++ console app

int main()
{
  return 0;
}

compiled in Visual Studio 2015 Update 2 adds a call to telemetry_main_invoke_trigger to both Debug and Release binaries.

How can I prevent this?


回答1:


According to Microsoft’s Steve Carroll (Development Manager for the Visual C++ team), you can remove telemetry calls by adding notelemetry.obj to the command options of the linker:

Steve Carroll explained that this will be removed in the upcoming Update 3:

Our intent was benign – our desire was to build a framework that will help investigate performance problems and improve the quality of our optimizer should we get any reports of slowdowns or endemic perf problems in the field. We apologize for raising the suspicion levels even further by not including the CRT source, this was just an oversight on our part. Despite that, some of you already investigated how this mechanism works in nice detail. As you have already called out, what the code does is trigger an ETW event which, when it’s turned on, will emit timestamps and module loads events. The event data can only be interpreted if a customer gives us symbol information (i.e. PDBs) so this data is only applicable to customers that are actively seeking help from us and are willing to share these PDBs as part of their investigation. We haven’t actually gone through this full exercise with any customers to date though, and we are so far relying on our established approaches to investigate and address potential problems instead. We plan to remove these events in Update 3. In the meantime, to remove this dependency in Update 2, you should add notelemetry.obj to your linker command line.



来源:https://stackoverflow.com/questions/37761768/how-to-prevent-visual-studio-2015-update-2-to-add-telemetry-main-invoke-trigger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!