Difference in performance of compiled accelerate code ran from ghci and shell

I investigated accelerate and accelerate-cuda and put some debug code to measure a time both under ghci and in a compiled, optimised version. Results are below, you can see stack trace and execution times. ghci run $ ghc -O2 -dynamic -c -threaded Main.hs && ghci GHCi, version 7.8.3: http://www.haskell.org/ghc/ 😕 for help … Loading package … Read more

What is the System objects in chrome javascript memory profiler

According to the JSHeapSnapshot.js implementation in Chromium, as mentioned in a comment by wOxxOm, a comparison for a given node distance to 100000000 is performed (distances[ordinal] >= WebInspector.HeapSnapshotCommon.baseSystemDistance, where WebInspector.HeapSnapshotCommon.baseSystemDistance = 100000000) and if passing, the size is accumulated into the System segment of the pie chart. The commit that last modifies this value mentions, … Read more

What restriction is perf_event_paranoid == 1 actually putting on x86 perf?

In this case CPU event refers to monitoring events per CPU rather than per task. For perf tools this restricts the usage of -C, –cpu= Count only on the list of CPUs provided. Multiple CPUs can be provided as a comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2. In … Read more

gprof : How to generate call graph for functions in shared library that is linked to main program

gprof won’t work, you need to use sprof instead. I found these links helpful: How to use sprof? http://greg-n-blog.blogspot.com/2010/01/profiling-shared-library-on-linux-using.html Summary from the 2nd link: Compile your shared library (libmylib.so) in debug (-g) mode. No -pg. export LD_PROFILE_OUTPUT=`pwd` export LD_PROFILE=libmylib.so rm -f $LD_PROFILE.profile execute your program that loads libmylib.so sprof PATH-TO-LIB/$LD_PROFILE $LD_PROFILE.profile -p >log See the … Read more

What is -no-pie used for?

That flag is telling gcc not to make a position independent executable (PIE). PIE is a precondition to enable address space layout randomization (ASLR). ASLR is a security feature where the kernel loads the binary and dependencies into a random location of virtual memory each time it’s run.

How to profile PostgreSQL Database?

“Keep an eye on” and “profile” are two quite different tasks in my view. For profiling (not a live view on what’s going on right now, but to see which queries take most time etc), check out pgFouine: http://pgfouine.projects.postgresql.org/ This will let you see which queries are resource intensive, and take appropriate action: Add missing … Read more