首页 > 系统相关 >使用VS2022 Performance Profiler进行Native内存分析

使用VS2022 Performance Profiler进行Native内存分析

时间:2024-10-06 21:43:54浏览次数:1  
标签:VS2022 抓取 Profiler 点击 Snapshot 内存 Performance Native

注:勾选Memory Usage进行Native内存抓取

 

不带pdb要进行Native内存抓取

点击Start按钮开始进行内存分析

 

点击“Stop Collection”按钮,来结束Profile。

 

注:如果报如下错误:Failed to load memory usage view: System.NullReferenceException,需要将VS2022升级到最新或使用VS2019

 

注1:Native Allocations为当前Native内存分配次数(不包含被释放的)

注2:Native Heap Size为当前的Native堆大小(不包含被释放的)

注3:点击橙色框的数字,则会打开Snapshot 1与Snapshot 2的diff数据

 

点击绿框数字,打开Snapshot 1的Native Memory数据

注:右上角Compare With Baseline下拉框中,可以选择其他的Snapshot,来查看两个Snapshot之间的diff数据

 

点击Unresolved allocations,得到如下列表:

 

点击Stacks标签,以堆栈聚类的方式来查看Native内存分配

 

带pdb进行Native内存抓取

如果把pdb文件与exe文件放在一起,则Profile时会自动进行符号解析

 

重新运行Performance Profiler,抓取一个41.40s的Snapshot,此时可以看到地址已经被解析成了符号

 

点击mytest1-win64-debug!FStatMessage,得到如下列表:

 

点击Stacks标签,以堆栈聚类的方式来查看Native内存分配

注1:点击Stacks标签页会执行归类操作,非常卡

注2:展开树节点不卡,但是选中某行时非常卡

 

参考

在不进行调试的情况下分析性能探查器中的内存使用情况(C#、Visual Basic、C++、F#)

标签:VS2022,抓取,Profiler,点击,Snapshot,内存,Performance,Native
From: https://www.cnblogs.com/kekec/p/18018324

相关文章

  • 在VS2022上安装pygame模块
    一、安装在vs2022中随便打开或生产一个python项目,找到最右边的“解决方案资源管理器”,并找到“python环境”,点击鼠标右键打开“查看所有python环境”打开以后找到下面的“在PowerShell中打开”,点击打开然后输入”pipinstallpygame“并等待安装即可二、测试输入以下代码并运......
  • COMS 6998 - High Performance Machine Learning
    COMS6998-HighPerformanceMachineLearningHomeworkAssignment1Fall2024DueDate:September292024UsetheGoogleCloudplatform.(GCP)oryourownmachine.MakesurethatyourGoogleVMoryourmachinehasatlast32GBofRAMtobeabletocomplet......
  • 【工具使用】【JProfiler】【K8S】JProfiler 直接连接你的阿里云上的 ACK 或者你的 K8
    1 前言最近有个线上系统的CPU比较高,当然我们可以去线上导一份快照,然后分析快照。最近发现JProfiler可以直接连接你线上的集群然后分析某个服务,直接可以在本地看到你服务的各种运行情况,当然这可能会拖慢你的服务,因为它也是通过JVM本身提供的远程加载Agent继而收集各种信......
  • WPF ScrollViewer.IsDeferredScrollingEnabled is true can enhance the performance
    Whenanitemscontrolisusingavirtualizingpanel anditcontainsalargenumberofcomplexitems,settingIsDeferredScrollingEnabledto truecanresultinasignificantperformanceimprovementbyavoidingtherenderingof intermediatestates.Applicati......
  • WEB-API+.NET+CRUD+SSMS(VS2022)
    1.使用VS2022创建一个web-api项目,根目录如下:其中TestCode.cs写model实体类,Controller编写控制器2.实体类Item,编写对应的属性点击查看代码publicclassItem{[Required]publicintId{get;set;}[Required]publicintFieldID{get;set;}......
  • [Javascript Vue] Improve heavy component loading performance
    Let'ssaywehaveaVueapplicationthatrendersmanyheavycomponentsonthefirstload.Theproblemwe'refacingisalongwhitescreenperiodwhileJavaScriptisloadingandthebrowserispainting.Howcanweoptimizeperformance?Sincethe......
  • ParallelStreamPerformance2
    packagecom.shrimpking.t4;/***CreatedbyIntelliJIDEA.**@Author:Shrimpking*@create2024/9/1212:09*/publicinterfaceTest{voidtest();}packagecom.shrimpking.t4;/***CreatedbyIntelliJIDEA.**@Author:Shrimpking*@cr......
  • ParallelStreamPerformance
    packagecom.shrimpking.t4;/***CreatedbyIntelliJIDEA.**@Author:Shrimpking*@create2024/9/1212:09*/publicinterfaceTest{voidtest();}packagecom.shrimpking.t4;/***CreatedbyIntelliJIDEA.**@Author:Shrimpking*@cr......
  • VS2022中文字符输出为乱码的解决
    一、问题vs2022输出中文时,出现乱码现象二、解决方案 把文件的字符编码格式改为utf-8格式选择工具,点击自定义选择命令,点击添加命令 选择文件,点击高级保存选项,然后点击确定 点击高级保存选项 选择utf-8编码格式,然后点击确定 三、问题解决 ......
  • 使用 Performance API 实现前端资源监控
    1.PerformanceAPI的用处PerformanceAPI是浏览器中内置的一组工具,用于测量和记录页面加载和执行过程中的各类性能指标。它的主要用处包括:监控页面资源加载:跟踪页面中的资源(如CSS、JavaScript、图片)的加载时间。分析页面加载时间:从导航到页面完全渲染的所有时间点。衡量......