profiling

Attaching Visual Studio debugger causes high CPU usage and UI thread locks

不羁的心 提交于 2019-12-13 06:49:16
问题 I have a WPF app that does some async networking (negotiation over 100 sockets in parallel). If I launch app with VS debugger attached and start networking code my CPU usage jumps to 60% (shared between VS, VS debugger and vshost processes) and UI becomes very unresponsive with constant freezes up to 3 seconds. The same happens when I attach a debugger to already running process. Under normal conditions it uses 1-3% CPU and UI is smooth. VS profiler in "CPU usage" mode shows that CPU is used

How to compare several Gprof profiler reports?

旧城冷巷雨未停 提交于 2019-12-13 06:24:26
问题 In multiple run of my C program with different parameter values, I get multiple profiling report files. This is too difficult to read and compare. Is there a way I can get a comparison file, preferably with graphs to show , how the performance increased or decreased as the size (the parameter that i am passing at the run time ) is increased. 回答1: Try perf(1) tool. perf record ./yourbinary perf record ./yourbinary-v2 perf diff Having compiler options "-O0 -g -ggdb" around when making binaries

Interpreting profiler log for STL based code

笑着哭i 提交于 2019-12-13 06:08:01
问题 I did a generalization a an algorithm implementation. Now, the new implementation runs more than 100 times slower than the old one. My guess is that the source unnecessary use of inefficiency is implicit copy constructors that I somehow introduced. I tried to profile the code, but I get a lot of data that I do not understand. Do I really need to know STL internals to be able to profile STL based code? Snippet of the flat profile: Flat profile: Each sample counts as 0.01 seconds. % cumulative

QScriptEngineAgent - obtaining callee name

♀尐吖头ヾ 提交于 2019-12-13 05:26:58
问题 I'm trying to implement a simple QtScript performance profiler via QScriptEngineAgent , by catching function entries and exits. I successfully subscribed to QScriptEngineAgent::functionEntry() callback. Now, is it possible to obtain the name (as string) of the function which is being called, inside this callback? Even though I'm aware that not all script functions need to have a name, even in the most simple cases it doesn't seem to work. QScriptContextInfo provides facilities for that, but

different occupancy between calculator and nvprof

时光总嘲笑我的痴心妄想 提交于 2019-12-13 05:19:15
问题 I am using nvprof to measure achieved occupancy and I am findind it as Achieved Occupancy 0.344031 0.344031 0.344031 but using occupancy calculator , I am finding 75%. The results are: Active Threads per Multiprocessor 1536 Active Warps per Multiprocessor 48 Active Thread Blocks per Multiprocessor 6 Occupancy of each Multiprocessor 75% I am using 33 registers , 144 bytes shared memory , 256 threads/block ,device capability 3.5. EDIT: Also , something I want to clarify.In http://docs.nvidia

Windows phone profiler, heap summary shows not a complete summary?

这一生的挚爱 提交于 2019-12-13 04:23:57
问题 Graph shows that it is used about 30 MBs of memory. However, Heap summary shows info for less than 1 MB (if looking at "retained allocations at end). What can be a reason for that, how to get the rest? 回答1: The profiler only shows you allocations done by managed code. Unfortunately, allocations can be done by native code too (for instance, when you load a picture), and those aren't traced by the profiler. This makes tracking memory leaks especially tricky on Windows Phone. 来源: https:/

How to Trace Mysql Slow-query-log-file Entries Using PHP Profiler

喜夏-厌秋 提交于 2019-12-13 03:58:31
问题 I just started using PHP profiler to find files in php script which caused slow mysql queries. Some suggested that I use xdebug to track it with the timestamp from the slow log-file entry compared to the files in php profiler that was executed at the same timestamp. I have read the xdebug documentation but can't find an explanation of this problem. Can anyone give me enlightenment? I'm using php 7.0, Debian 9. My slow-query-log-file entries: # Thread_id: 222244 Schema: user QC_hit: No # Query

Perf Monitoring for rdtsc dynamically

烈酒焚心 提交于 2019-12-13 03:27:13
问题 Is there a way to monitor for assembly instructions in "real-time" dynamically using perf? I have seen that if I use perf record /perf top and then click on the recorded functions, I see the assembly instructions, but can I directly monitor specific assembly instructions e.g., rdtsc or clflush e.g., how often they are called by a process within certain period using perf? I am using Debian 9 on Skylake and also on Haswell. sudo uname -a Linux bla 4.9.0-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27

Deadlock under ReadCommited IL

白昼怎懂夜的黑 提交于 2019-12-13 02:41:45
问题 Why would a process running a transaction at RC isolation level hold an IX page lock if it is already running a select statement on another table? I mean, i thought that locks are released when the statement finishes (that is why we could have non-repeatable reads). Here's the deadlock xml: <deadlock-list> <deadlock victim="process5cd048"> <process-list> <process id="process5cd048" taskpriority="0" logused="10000" waittime="2220" schedulerid="3" kpid="5764" status="suspended" spid="62" sbid=

Is “Running Time”, “CPU Usage” a useful metric under Instruments to draw any conclusions?

懵懂的女人 提交于 2019-12-13 02:20:47
问题 Have profiled an app on an iPhone 4 using "Time Profiler" and "CPU Monitor" and trying to make sense of it. Given that execution time is 8 minutes, CPU "Running Time" is around 2 minutes. About 67% of that is on the main thread, out of which 52% is coming from "own code". Now, I can see the majority of time being spent in enumerating over arrays (and associated work), UIKit operations, etc. The problem is, how do I draw any meaningful conclusions out of this data? i.e. there is something