Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5014 Discussions

VTune not working for .NET programs on my machine (even the listadd example)

luoluo40
Novice
1,544 Views

Tried for different configruations with DEBUG and RELEASE build, set DebugType to pdbonly, embedded or full, or build with .net 6/7/8, launch application with dotnet.exe or run listadd.exe directly.

turn off antiware software or restart computer does not work.

but none of those combination works and VTune keep saying the dll "does not have code of the expected architecture", sometime the symbol file "is not a valid .NET Core symbol file"

 

I am using the latest 2024.0.1

 

luoluo40_0-1706586386131.pngluoluo40_1-1706586474574.png

luoluo40_2-1706586581228.png

 

Labels (1)
1 Solution
yuzhang3_intel
Moderator
1,463 Views

It should be one issue related to environment, there is one similar issue reported on forum a few weeks ago. The issue has been reported to engineering team.

View solution in original post

0 Kudos
11 Replies
yuzhang3_intel
Moderator
1,506 Views

Can you provide sample code for reproducing in local? Thanks.

0 Kudos
luoluo40
Novice
1,496 Views

Sure! I am following the instructions on this page Profiling a .NET* Core Application (intel.com)

and here is the sample code,but I don't think this issue is related to the code?

using System;
using System.Linq;
using System.Collections.Generic;

namespace listadd
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Starting calculation...");            
            List<int> numbers = Enumerable.Range(1,10000).ToList();
            for (int i =0; i < 100000; i ++)
            {
                ListAdd(numbers);
            }
            
            Console.WriteLine("Calculation complete");            
        }

        static int ListAdd(List<int> candidateList)
        {
            int result = 0;
            for (int i = 0; i < candidateList.Count; i++)
            {
                result += candidateList[i];
            }

            return result;
        }        
    }
}

 

0 Kudos
yuzhang3_intel
Moderator
1,495 Views

Thanks, it looks good, could you also provide me with the vtune data? 

0 Kudos
luoluo40
Novice
1,491 Views

Sure! This is my vtune project

0 Kudos
yuzhang3_intel
Moderator
1,482 Views

The same issue is observed in my local when opening the vtune project.

I re-resolve the data as below, it looks the data is good, you can try.

 

re-resolve:

yuzhang3_intel_0-1706757165244.png

 

yuzhang3_intel_1-1706757229102.png

 

0 Kudos
luoluo40
Novice
1,473 Views

re-resolve does not work on my machine, but when I install vtune in a virtual machine (windows sandbox), load the project and re-resolve, it works fine.

so this may be a issue related to environment or operation system?

 

update: when I upload the binary files, it still be 'Cannot locate file `D:\listadd2\bin\Release\net7.0\listadd2.dll'. `C:\listadd2\bin\Release\net7.0\listadd2.dll' does not have code of the expected architecture. Make sure to specify the correct path to the file in the Binary/Symbol Search list of directories.' and no detailed content about functions inside dll.

0 Kudos
yuzhang3_intel
Moderator
1,464 Views

It should be one issue related to environment, there is one similar issue reported on forum a few weeks ago. The issue has been reported to engineering team.

0 Kudos
Jennifer_D_Intel
Moderator
1,335 Views

I just want to make sure the latest version is linked in this thread, as the cookbook recipe has been recently updated from the version posted:

https://www.intel.com/content/www/us/en/docs/vtune-profiler/cookbook/2024-0/profiling-a-net-core-application.html

0 Kudos
luoluo40
Novice
1,309 Views

the latest version is linked in this thread.

I am using the latest version. When I posted, I didn't notice that the cookie recipe I was using was not the latest. But later on, I also reproduced this issue while using the latest version of the cookie recipe.

This seems to be an issue that occurs for all dotnet programs ('Cannot locate file `D:\listadd2\bin\Release\net7.0\listadd2.dll'. `C:\listadd2\bin\Release\net7.0\listadd2.dll' does not have code of the expected architecture. Make sure to specify the correct path to the file in the Binary/Symbol Search list of directories.'), both cookie recipes follow the almost same way to build and run program, and this issue has indeed been reproduced using the latest version.

0 Kudos
yuzhang3_intel
Moderator
831 Views

I see your working path includes ™  and ®  special characters, please remove them and then capture again.

 

405 [8532] INFO perfrun.mrte <> - Data directory: E:\Intel® VTune™ Profiler Results\dotnet\r005hs\data.0

0 Kudos
yuzhang3_intel
Moderator
481 Views

Did you try? One similar issue is resolved using the same solution.


0 Kudos
Reply