Visual Studio 2017 profiler does not show function names

24206230 20 Reputation points
2023-04-04T15:04:12.8466667+00:00

Hi,
I ran the Profiler (Alt+F2) in Visual Studio 2017 on several projects of mine, but they all show the same thing. I get a table where under “Function Name” column, I only have the project exe name and PID number. I am running in Release mode, x64, Local windows Debugger. SDK version: 10.0.17763.0 What could be the issue and how to fix it? A simple example of a code I tested is:

#include <cstdio>

void func1()
{
	for (int i = 0; i < 1000; i++)
	{
		printf("%d\n", i);
	}
}

void func2()
{
	for (int i = 0; i < 1000; i++)
	{
		func1();
	}
}

int main()
{
	func2();
}
Developer technologies | Visual Studio | Debugging
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 34,441 Reputation points Microsoft External Staff
    2023-04-05T05:39:44.37+00:00

    Hello @24206230 ,

    Welcome to Microsoft Q&A forum.

    I tested on my side and stopped recording after several seconds and I got following table: User's image

    Do you mean that main and printf(functions) are not listed there? Could you please share us a screenshot to confirm this issue?

    Besides, which tool did you select, CPU Usage, GPU Usage, Memory Usage or …?

    Currently, I suggest try following methods:

    1. Reset VS settings by opening Developer Command Prompt for VS 2017 > run devenv /ResetSettings.
    2. Check if there’s any setting/limitation for your machine, such as for CPU, for GPU, for Memory.
    3. If you are using performance profiler on a Virtual Machine, a remote machine or something similar, then please let us know.
    4. Try to create a new solution and copy your sample code to this new solution then test again, this is useful for narrowing down this issue.

    Please feel free to contact us.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.