Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5247 토론

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

luoluo40
초보자
4,143 조회수

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

 

레이블 (1)
1 솔루션
yuzhang3_intel
중재자
4,062 조회수

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 포인트
11 응답
yuzhang3_intel
중재자
4,105 조회수

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

0 포인트
luoluo40
초보자
4,095 조회수

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 포인트
yuzhang3_intel
중재자
4,094 조회수

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

0 포인트
luoluo40
초보자
4,090 조회수

Sure! This is my vtune project

0 포인트
yuzhang3_intel
중재자
4,081 조회수

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 포인트
luoluo40
초보자
4,072 조회수

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 포인트
yuzhang3_intel
중재자
4,063 조회수

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 포인트
Jennifer_D_Intel
중재자
3,934 조회수

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 포인트
luoluo40
초보자
3,908 조회수

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 포인트
yuzhang3_intel
중재자
3,430 조회수

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 포인트
yuzhang3_intel
중재자
3,080 조회수

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


0 포인트
응답