profiling

Automating the profling of C program using GPROF

和自甴很熟 提交于 2019-12-12 00:23:43
问题 I am profiling a matrix multiplication C program using gprof. That C program has a general structure like this; int main() { int n; printf("enter size of square matrices"); scanf("%d", &n); data(matM); //fill matrices with n x n random data data(matN); // this is unoptimized algo matUnopt(int *matM, int *matN, int *MatOut, int size); // this is optimized algo matOpt(int *matM, int *matN, int *MatOut, int size); return(0); } Now at present how I am profiling is: I run my executable mat, give

How to profile an EXE and the DLLs it loaded at the same time?

六月ゝ 毕业季﹏ 提交于 2019-12-11 20:17:19
问题 I'm using the MinGW GCC compiler on Windows. If I add -pg switch to the compiler I can generate both the EXE and the DLL with profile data. The gmon.out is generated. But the problem is that when I use gprof myprogram.exe gmon.out I get no profile output (other than the table headings and other text). gprof mydll.dll gmon.out I get the output for that particular DLL only but not for the main exe. Maybe both the exe and the dll wanted to generate the same file and the dll won. The goal is

Confused about profiling result

蹲街弑〆低调 提交于 2019-12-11 18:44:15
问题 I have built my program with " -g -O2 " and ran valgrind +cachegrind. I am unsure how to interpret the output. Here is the output: http://daviddoria.com/Uploads/callgrind.CacheMisses My "whole program" is the InpaintingAlgorithm function that is 98.4% of "main". So far so good. Now looking at the callees of InpaintingAlgorithm , 92.9% of InpaintingAlgorithm is LinearSearchKNNProperty::operator() . This is my "inner loop", and again I expect a huge amount of the time to be spent here. Now here

Impossible to get PHP Yii waiting TTFB time under 2s (with profiling results)

故事扮演 提交于 2019-12-11 16:55:35
问题 I created Yii2 basic app https://www.yiiframework.com/doc/guide/2.0/en/start-installation but the index.php waiting time (TTFB) always is around 2s, no less, download time is around 43ms and all the other resources of the default app (CSS, JS) are donwloaded withing 10ms (all as observed from Google developer tools), that is fine. I am running everything on my development machine Windows 10 4GHz, 16GB RAM, low resrouce consumption. I am adding the xDebug profiling results of index.php call:

Removing existing profile providers

吃可爱长大的小学妹 提交于 2019-12-11 15:48:49
问题 Q1 Book suggests that before we register new SqlProfileProvider , we should remove any existing profile providers using <clear> element. But: A) why must we use <clear> instead of <remove> ? B) I assume that root web.config or machine.config don’t register (by default) any profile provider, and thus using <clear> element is not necessary? Q2 I assume reason why each profile property doesn’t have a corresponding column in a database table ( instead all properties are stored into a single field

Is it possible using the VS2010 profiler to sample a thread other than the Main Thread in C#

徘徊边缘 提交于 2019-12-11 14:47:23
问题 I'm trying to profile an app in c#, never done any kind of profiling before. I haven't been able to find much documentation on the profiler so far maybe someone here might know better. I have an app that when I click a toolbar button, kicks off a background thread to fetch me some data. The data is then prepared and displayed on the Main thread. I'm trying to profile this process to determine whether the time taken is in the preparation of the data or in the fetching, but I'm not having much

VS2013 Profiler: location of collected data

泄露秘密 提交于 2019-12-11 14:19:37
问题 On my machine I two drives: C(128GB SSD) and D( 1Tb HardDisk). In VS2013 I'm analysing the memory usage of an application I've developed. I had installed VS in C and run one of those memory usage analysis from Analysis>Performance and Diagnostics>Memory Ussage. All fine here. My problem is that I'm short of space in C and I can't run long analysis. Therefore, I decided to uninstall VS from C and install it in D hoping that all this profiling info was going to be (temporarily, i.e. the file

Django / WSGI - How to profile partial request? My profiling tools are per-request but app runs out of memory before then

∥☆過路亽.° 提交于 2019-12-11 14:19:20
问题 How can I profile my python / django application which is crashing on a single request after 100 seconds of hogging more memory? All I see in top is that the wsgi process is consuming memory slowly until it crashes. The only profiling techniques I know run on a full request/response cycle but I'm not able to finish a request. What then? I might even run the dev server and try to kill it mid-request and see where the stack is. 回答1: A bit fiddly and will have some overhead, but you could use

How does getrusage() report time spent hibernating?

笑着哭i 提交于 2019-12-11 13:54:32
问题 I am currently using getrusage to tell me how much time I spend in my application's event loop. I wonder how this will be affected by hibernating. Is hibernation time reported at all? Or perhaps as system time? Is this specified somewhere in Posix or is this system dependent? Edit Asking the same question for Windows here. 回答1: I don't think POSIX mentions hibernation anywhere, so it is technically platform dependent. I can only speak for Linux, but other UNIX variants - and perhaps even

nvprof not picking up any API calls or kernels

為{幸葍}努か 提交于 2019-12-11 12:16:05
问题 I'm trying to get some benchmark timings in my CUDA program with nvprof but unfortunately it doesn't seem to be profiling any API calls or kernels. I looked for a simple beginners example to make sure I was doing it right and found one on the Nvidia dev blogs here: https://devblogs.nvidia.com/parallelforall/how-optimize-data-transfers-cuda-cc/ Code: int main() { const unsigned int N = 1048576; const unsigned int bytes = N * sizeof(int); int *h_a = (int*)malloc(bytes); int *d_a; cudaMalloc(