Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5104 ディスカッション

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

luoluo40
初心者
2,331件の閲覧回数

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
モデレーター
2,250件の閲覧回数

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.

元の投稿で解決策を見る

11 返答(返信)
yuzhang3_intel
モデレーター
2,293件の閲覧回数

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

luoluo40
初心者
2,283件の閲覧回数

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;
        }        
    }
}

 

yuzhang3_intel
モデレーター
2,282件の閲覧回数

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

luoluo40
初心者
2,278件の閲覧回数

Sure! This is my vtune project

yuzhang3_intel
モデレーター
2,269件の閲覧回数

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

 

luoluo40
初心者
2,260件の閲覧回数

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.

yuzhang3_intel
モデレーター
2,251件の閲覧回数

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.

Jennifer_D_Intel
モデレーター
2,122件の閲覧回数

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

luoluo40
初心者
2,096件の閲覧回数

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.

yuzhang3_intel
モデレーター
1,618件の閲覧回数

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

yuzhang3_intel
モデレーター
1,268件の閲覧回数

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


返信