Shark
Swift Script that transforms the .xcassets folder into a type safe enum
I need to sample a (cli) application with shark and pass parameters to it like so:
shortest-path <input-ref-littleendian|diff -u - output-ref
How can I do this with shark
? Shark assumes that the parameters i need to pass to the launched cli app are for shark itself, not the process.
Source: (StackOverflow)
I'm trying to use Shark to check for L2 cache misses, but it won't work. All of the other Shark sampling modes work fine.
Source: (StackOverflow)
I set it to iPhone/Network mode, but the device never appears anywhere. Connected and running an app through xcode. Do you know a useful tutorial for this?
Source: (StackOverflow)
I am profiling a C program using Mac's Shark which shows that some of CPU time goes to "blkclr" in "mach_kernel". What does this kernel function do? I speculate it is related to memory allocation, but I am not sure. I have googled for some time, but could not find the answer, either. Does someone know this? Thanks in advance.
Source: (StackOverflow)
Shark told me this:
This instruction is the start of a
loop that is not aligned to a 16-byte
address boundary. For optimal
performance, you should align the
start of a hot loop using a compiler
directive. With gcc 3.3 or later, use
the -falign-loops=16 compiler flag.
for (int i=0; i < 4; i++) { // line with the info
//...code
}
How would I set that flag, and does it really improve performance?
Source: (StackOverflow)
I am trying to use Shark to profile my app. However, it crashes after I hit "stop" and it analyzes and then goes to "load session". Only once when I decided not to select my app but chose to target "everything" did it actually display some trace. However, I could not reproduce this case. Does anyone have any idea what might be going wrong? Could it be something to do with the wrong version of Shark or my SDK or some other detail? I have the latest SDK and am running 3.1.3 on the phone.
The various documentation I've found on google or via Apple's docs don't seem to be terribly helpful, so if anyone has found some that's useful, I'd love to see it. Thanks.
Source: (StackOverflow)
I've written several copy functions in search of a good memory strategy on PowerPC. Using the Altivec or fp registers with cache hints (dcb*) doubles the performance over a simple byte copy loop for large data. Initially pleased with that, I threw in a regular memcpy to see how it compared... 10x faster than my best! I have no intention of rewriting memcpy, but I do hope to learn from it and accelerate several simple image filters that spend most of their time moving pixels to and from memory.
Shark analysis reveals that their inner loop uses dcbt to prefetch, with 4 vector reads, then 4 vector writes. After tweaking my best function to also haul 64 bytes per iteration, the performance advantage of memcpy is still embarrassing. I'm using dcbz to free up bandwidth, Apple uses nothing, but both codes tend to hesitate on stores.
prefetch
dcbt future
dcbt distant future
load stuff
lvx image
lvx image + 16
lvx image + 32
lvx image + 48
image += 64
prepare to store
dcbz filtered
dcbz filtered + 32
store stuff
stvxl filtered
stvxl filtered + 16
stvxl filtered + 32
stvxl filtered + 48
filtered += 64
repeat
Does anyone have some ideas on why very similar code has such a dramatic performance gap? I'd love to marinate the real image filters in whatever secret sauce memcpy is using!
Additional info: All data is vector aligned. I'm making filtered copies of the image, not replacing the original. The code runs on PowerPC G4, G5, and Cell PPU. The Cell SPU version is already insanely fast.
Source: (StackOverflow)
I'm trying to use Shark to determine which method(s) are taking the most time in my iPhone app. After sampling, I get this:
Clicking the "!" button yields:
Shark was unable to find symbol
information for this address range.
Typically this happens because the
application was compiled without
symbols or they have been subsequently
stripped away. In Xcode, make sure the
"Generate Debug Symbols" checkbox is
selected (passes the -g flag to the
compiler). Note that this does not
affect code optimization, and does not
typically alter performance
significantly. However, the extra
symbol information does consume
significantly more space and may bloat
the size of the executable.
But I AM using the Debug option, and I am running on my Device. And Generate Debug Symbols IS checked. So what's wrong?
Source: (StackOverflow)
Shark started crashing on me when I use the "Processor Bandwidth (Core 2)" mode of analysis. It collects the samples, spends the time to analyze them, and crashes with a bus error about when the window should come up.
First I thought it might be because I've been running on low memory. I installed the latest system updates, rebooted, tried again. No difference. Installed latest XCode, no difference. Used CHUD Remover, reinstalled Shark, rebooted, no difference. Tried building with symbols and without.
All the other analyses work. I don't have any third-party KEXTs and never had problems with this before.
Has anyone else seen this? Is there another forum where I can ask this kind of thing? (Apple's dev forums require a $500/yr support package!) Is there a verbose mode for Shark, perhaps via command-line option?
Source: (StackOverflow)
I want to use shark to profile my application(I used it before and it worked fine), but now it does not show any function name. I have only Unknown Library and address[unknown] in symbol column. Some project parts are static libraries(compiled and linked in same project, with debug symbols on). Function names from standard lib or from other framework are shown.
Thanks for help!
Source: (StackOverflow)
I have a question about Shark-profiling on mac.
Say if I have a C-program, compiled with:
gcc -o mycprog mycprog.c -g -pg
and also I have a shell script something like:
for file in ($SomeDirectory)
do
mycprog $file
done
I need to profile the average performance for all files in $SomeDirectory.
Where should I put the shark -i
command? Thanks.
Source: (StackOverflow)
I'm trying to profile Ruby interpreter. I run shark -i ./ruby bm_sudoku.rb
or something like that, the script finishes in less than a second, and then Shark goes to "CHUDData - Analyzing samples... 99.3%.." point and stays there frozen for 10 minutes or so. It finishes eventually, it's just so ridiculously slow it's pretty much unusable.
Version I have here is OSX 10.5, shark 4.6.1 (227).
Any ideas what that might be?
Source: (StackOverflow)
We are trying to run shark on our iphone application. However, in the analyzed samples it does not list any of our application function. All that is listed are the libraries and when we click on any of those, the assembly code is visible.
Most of the sites mention about 'Generate Debug Symbols' option when building the app; I am not able to find this option either. Instead I have enabled the 'Generate Profiling Information' option.
Can anyone please help as to how do I see my application functions and source code in the analyzed samples of Shark?
Source: (StackOverflow)
This is probably a rather dumb question but I've been looking around the Apple developer pages and I haven't found any download link to shark. I did a search on my hard drive and I only found shark plugins...
Source: (StackOverflow)