Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #4216

Kernrate Viewer Download !LINK!

Newsgroups comp.lang.basic.visual.misc
Date 2024-01-21 13:30 -0800
Message-ID <0b346a70-c272-48b8-9cab-7e51dc43780fn@googlegroups.com> (permalink)
Subject Kernrate Viewer Download !LINK!
From Manila Ursua <ursuamanila@gmail.com>

Show all headers | View raw


<div>When Windows 7 was released I had a performance issue that I was able to tediously work through with kernrate. It's my understanding that the tools have only improved since this time. I have a renewed interest in analyzing portions of my code paths with increased (perhaps unnecessary) delays. CPU utilization is uncharacteristically high, and I'd like to correct it.</div><div></div><div></div><div>Don,</div><div></div><div>I suspect the pain of using kernrate is directly proportional to my familiarity with it. I remember having a difficult time understanding the workflow, so I ended up fighting the tool more than the problem I was trying to solve. Again probably my own ignorance. Do you know of any good references for effectively using kernrate?</div><div></div><div></div><div></div><div></div><div></div><div>kernrate viewer download</div><div></div><div>Download Zip: https://t.co/Oi6RxE1dzQ </div><div></div><div></div><div>Yes, although I'm not sure what counts as "normal" VS's built-in native code profiler is way behind WPA for CPU analysis, but much further ahead for heap footprint analysis. (And even more so for its managed code profiler.) Intel has a cool profiler, but it runs out into the architectural details of your processor, so I'd be hesitant to call that tool "normal". There's old-timey tools like kernrate, which WPA can replicate, but WPA integrates so much more information into your workbench that it's not even the same league. Linux "perf" has a few neat features that WPA doesn't, but they both do the same basic stackwalking + profiling.</div><div></div><div></div><div>Well top would be the traditional process viewer. Apparent there is a ktop for KDE which would be a graphical version. What features do you require from the tool and we may be able to choose a better solution.</div><div></div><div></div><div>Traveling back thru this process we find out that when something pushes the processor over 99 % utilization then it triggers the script cscript KernCap.vbs which is supposed to be in the C:\\tools\\kernrate folder. (Neither the script or the location exist on my system)</div><div></div><div></div><div>Aby wystartować program, trzeba uruchomić Start  Wszystkie programy  Akcesoria  Wiersz polecenia (w trybie administratora), wpisać cd c:\program files\krview\kernrates i wybrać właściwy dla systemu plik wykonywalny. Najczęściej będzie to po prostu Kernrate_i386_XP.exe.</div><div></div><div></div><div>The last command actually launches the Xperf viewer, which is where we begin to realize the full power of Xperf. The first thing you will notice after Xperf has parsed the ETL is that it presents you with a series of graphs representing the activity on the system. Typically, you will see graphs such as CPU Sampling by CPU, which shows the percentage utilization of each CPU. For my trace, it looks like the graph shown in Figure 4.</div><div></div><div></div><div></div><div>You will also see the graph CPU Sampling by Process, and you should notice on that graph that our buggy application is flat-lined across the top, as shown in Figure 5. When you hover the mouse over one of the lines on the CPU Sampling by Process graph, it will show you the name and process identifier (PID) of the process. There are quite a few more graphs presented, some of which are not enabled by default. On the left side of the main Xperf window is a button for a flyout that you can activate to turn on or off some of the other available graphs. You can also do so by using the Graphs menu item.</div><div></div><div></div><div></div><div>Note: If you expected the buggy application to show 100 percent utilization on one of the processors in the CPU Sampling by CPU graph, the reason it does not is that the thread for the buggy application is being scheduled to multiple processors each time it is given a time slice. You can use Process Explorer to modify the process's processor affinity to achieve that result. For example, if you suspect a process is utilizing 100 percent of a processor's time, you should set its affinity to a single processor to verify. On my machine, I have eight logical cores and therefore, a runaway process is harder to spot since it only shows up in Task Manager as consuming 12 to 13 percent of the total CPU utilization.</div><div></div><div></div><div></div><div>The next thing you want to do is point Xperf to your symbols, and you will also want to include the path to the Microsoft public symbol server. My symbol path looks like the following (with path_to_buggy_app_symbols replaced with the actual path to the PDB files for the buggy application): srv*c:\symbols* ;C:\path_to_buggy_app_symbols.</div><div></div><div></div><div></div><div>Once you have symbols in place, be sure to enable Trace, Load Symbols from the menu; then you can start to examine stacks. The way to do this is to select a time span of interest in one of the sampling graphs, such as CPU Sampling by CPU, then right-click and select Summary Table. The first time you do this, it could take some time as the required symbols are downloaded. Once you do this, a window similar to that in Figure 6 will be displayed (I selected a small portion of the CPU Sampling by CPU graph during the time the application I titled CpuHog.exe was misbehaving).</div><div></div><div></div><div></div><div></div><div></div><div> </div><div></div><div>As you can see, this view shows you all the processes running during the selected interval as well as their relative weight. If you don't see the same columns as shown in Figure 6, you can bring out the flyout to easily turn particular columns on and off. Not surprisingly, CpuHog.exe is right near the top just under the system Idle process.</div><div></div><div></div><div></div><div>The gold horizontal bar is the aggregation bar and arguably the most powerful feature of the Xperf summary table view. It serves as a grouping operator, and anything on the left side serves as a grouping selector. For example, if you expand the Stack node for the CpuHog.exe process shown in Figure 6, you'll see that it starts showing you more details of the stacks sampled for CpuHog.exe. As an experiment, to see the aggregation bar in action, drag the Module column to a point between the Process and Stack column. Now you get an expandable node in the Process column that expands the modules for the process relevant to the range selected. You can also see that the sampled stacks have been partitioned by Module, as shown in Figure 7.</div><div></div><div> </div><div></div><div>In this view, you can see that KernelBase.dll has the highest weight within the CpuHog.exe process. This should not be a surprise since I am calling GetTickCount() as frequently as possible. If you expand the Stack node just to the right of KernelBase.dll, you can verify this, and you'll see a stack similar to the one that Figure 8 shows.</div><div></div><div></div><div></div><div>You may have noted that the stack is upside down when compared to the way we're used to looking at stacks in the debugger. In more complicated applications, you'll often see branches in the stack trace where a certain function, or node, along the way is expandable. This generally means that the function was sampled calling into multiple leaf functions. In such cases, you can see which path it spent the most time in by examining the weight. In this case, since there is no branching in the stack trace, the weight is uniform all the way down the stack since this same stack was the one sampled during the interval I selected for the summary view.</div><div></div><div></div><div></div><div>If you have a complicated stack trace and you just want to know who calls a particular function within the range you selected, you can right-click on the function and choose View Callers, Innermost, which will not only answer your question but will also show you the stack in the order your accustomed to in the debugger.</div><div></div><div></div><div></div><div>So for the purpose of this example, the summary view clearly shows us that most of the time is spent in GetTickCount(), which is called by CMainFrame::OnFileNew. Armed with this information, we can go straight to that point in the code and examine the problem in detail. Of course, in real life you will be presented with much more complicated scenarios.</div><div></div><div></div><div></div><div>A Versatile Tool</div><div></div><div>Although Xperf is not suitable for fine-grained performance tuning of code, it is certainly very powerful in pointing out performance bottlenecks in applications in a non-invasive manner. The fact that Xperf is non-invasive and relies on capabilities already built into the Windows 7 and Vista OSs makes it an attractive and ideal tool that every developer and tester should have in their toolbox. But Xperf does not just apply to user-mode applications. You can also use it to identify problems in driver code. And finally, what I have shown you here merely just scratches the surface of Xperf's capabilities. I highly recommend that you read the MSDN documentation as well as the various blog postings available on the Internet. Happy troubleshooting!</div><div></div><div></div><div></div><div></div><div></div><div>Trey Nash is a senior escalation engineer at Microsoft working on the Windows OSs and various other products. When he is not working feverishly within the bowels of the OS, he is delivering training on .NET platform and kernel mode debugging or playing ice hockey.</div><div></div><div></div><div></div><div></div><div></div><div> df19127ead</div>

Back to comp.lang.basic.visual.misc | Previous | Next | Find similar


Thread

Kernrate Viewer Download !LINK! Manila Ursua <ursuamanila@gmail.com> - 2024-01-21 13:30 -0800

csiph-web