profiling

How to profile code in hexagon dsp simulator

狂风中的少年 提交于 2020-01-05 04:23:08
问题 I have been trying to compile my code using -pg to enable profiling in the simulator and once I do that it gives me linker errors. Compilation command hexagon-clang++ main.cpp -o hello -mv62 -pg Error hexagon-clang++ main.cpp -o hello -mv62 -pg Error: /tmp/main-924ac3.o(.text+0x30): undefined reference to `mcount' Error: /tmp/main-924ac3.o(.text+0x130): undefined reference to `mcount' Fatal: Linking had errors. This is my first time to write code for DSP chip, specifically the hexagon 682.

What are some possible optimizations for NSDateFormatter's stringFromDate?

回眸只為那壹抹淺笑 提交于 2020-01-05 04:14:20
问题 I am currently profiling my iPhone application start-up in an attempt to get it to start as quickly as possible. In the first 19 seconds of my application being started I call NSDateFormatter's stringFromDate method 6 times with the following format string: @"h:mm a zzz" The NSDateFormatter instance itself is shared by all calls and I only set the date format once, but those 6 calls to stringFromDate amount to 17.3% of my start-up CPU time. Note: The dates are dynamic so I can't just save the

Measure Java Program Performance

人盡茶涼 提交于 2020-01-04 17:52:30
问题 I had an old application, a JAR file, that went through some enhancements. Basically some parts of the code had to be modified along with modifying some of the logic. Comparing the OLD version against the NEW version, the NEW version is about 2X slower than the old one. I'm trying to narrow down whats causing the slow down, but I'm finding myself measuring the time for certain for-loops using System.println with System.currentTimeMillis(). This is really getting very tedious. Is there a Java

Free profiling in C++? [duplicate]

前提是你 提交于 2020-01-04 09:06:40
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: What's your favorite profiling tool (for C++) In Java and they have a nice & free profiler that comes with the sdk called jvisualvm. Is there anything like that for C++? I'm on Windows and have Visual Studio 2010. I'm a student/hobbyist, so something free would be nice. jvisualvm lets you look inside your app and has a lot of need info. How much cpu/memroy things are taking, how many times it's being called,

Hadoop HPROF profiling no CPU SAMPLES written

自古美人都是妖i 提交于 2020-01-04 03:49:26
问题 I want to use HPROF to profile my Hadoop job. The problem is that I get TRACES but there is no CPU SAMPLES in the profile.out file. The code that I am using inside my run method is: /** Get configuration */ Configuration conf = getConf(); conf.set("textinputformat.record.delimiter","\n\n"); conf.setStrings("args", args); /** JVM PROFILING */ conf.setBoolean("mapreduce.task.profile", true); conf.set("mapreduce.task.profile.params", "-agentlib:hprof=cpu=samples," + "heap=sites,depth=6,force=n

GHC heap profiling with -hy - What is * (star)?

你离开我真会死。 提交于 2020-01-03 18:25:07
问题 When I profile my program's heap usage with -hy flag like ./prog +RTS -hy I often see the constructor * in the results, along with other constructors such as [] and Word8 . What is the type * in this context? Is it related to kinds ? 回答1: Quoted from Real World Haskell: There's also some heap allocated data of unknown type (represented as data of type "*"). And in the GHC User's Guide: For closures which have function type or unknown/polymorphic type, the string will represent an

Check running time per line in python

时光毁灭记忆、已成空白 提交于 2020-01-03 17:45:09
问题 I've written a Python script, but running it is taking a lot longer than I had anticipated, and I've no obvious candidate for particuklar lines in the script taking up runtime. Is there anything I can put in my code to check how long its taking to run through each line? Many thanks. 回答1: Have you tried running python with profiling? python -m cProfile --sort cumulative your_single_thread_script.py &> out.log You can find more details in this question How can you profile a python script? You

Visual Studio 2008 Performance Profiler Problems with ASP.NET

泄露秘密 提交于 2020-01-03 15:58:08
问题 I've been trying, and failing, to get VS.NET 2008 to profile an ASP.NET MVC application. When I try and start a profiling session I get a generic server 500 error from VS.NET: The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:4750/foo/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error. I've tried several things, including: ensuring that web.config is writable

Speeding up datetime.strptime

社会主义新天地 提交于 2020-01-03 15:55:23
问题 I am using the following piece of code to extract a date from a string: try: my_date = datetime.strptime(input_date, "%Y-%m-%d").date() except ValueError: my_date = None If I run this 750,000 times, it takes 19.144 seconds (determined with cProfile). Now I replace this with the following (ugly) code: a= 1000 * int(input_date[0]) b= 100 * int(input_date[1]) c= 10 * int(input_date[2]) d= 1 * int(input_date[3]) year = a+b+c+d c= 10 * int(input_date[5]) d= 1 * int(input_date[6]) month = c+d c= 10

Speeding up datetime.strptime

旧时模样 提交于 2020-01-03 15:54:13
问题 I am using the following piece of code to extract a date from a string: try: my_date = datetime.strptime(input_date, "%Y-%m-%d").date() except ValueError: my_date = None If I run this 750,000 times, it takes 19.144 seconds (determined with cProfile). Now I replace this with the following (ugly) code: a= 1000 * int(input_date[0]) b= 100 * int(input_date[1]) c= 10 * int(input_date[2]) d= 1 * int(input_date[3]) year = a+b+c+d c= 10 * int(input_date[5]) d= 1 * int(input_date[6]) month = c+d c= 10