<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RVDS profiler for arm and exceptions, broken?</title><link>https://community.arm.com/developer/tools-software/tools/f/armds-forum/546/rvds-profiler-for-arm-and-exceptions-broken</link><description> Note: This was originally posted on 24th March 2011 at http://forums.arm.com Hello all, I was advised by a co-worker to try arm&amp;#39;s RVDS for profiling my code. I followed tutorial to load profiler sample project for xvid that comes with RVDS. Then, I created</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RVDS profiler for arm and exceptions, broken?</title><link>https://community.arm.com/thread/1237?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:57:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:318d63c9-00dc-41bd-9bda-1db000f68eea</guid><dc:creator>fdsftrq gfdgfdsgfds</dc:creator><description>&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RVDS profiler for arm and exceptions, broken?</title><link>https://community.arm.com/thread/1238?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:57:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:91530586-f5a5-49c0-9c59-c331daa81240</guid><dc:creator>Scott Douglass</dc:creator><description>&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RVDS profiler for arm and exceptions, broken?</title><link>https://community.arm.com/thread/1236?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:57:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cbf176d8-ef55-4eec-9a3f-92063c6f2cdc</guid><dc:creator>fdsftrq gfdgfdsgfds</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 25th March 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Neon totally does not work for me.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I created simple test code, then took fft sample that comes with RVDS and modified files. I can run sample, but I change compilation to Cortex-A8 then I have this problem with exceptions.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I took a screenshot after I tried to profile my sample. On this screenshot you can my makefile and results of the profiler. As you see I have alternative --cpu=5te build which works, but the build for Cortex-A8 does not and generates this weird result with profiler: after running for a few seconds it shows that 160 instructions were executed (16ins/sec) and all these mysterious functions like __scater_load that took all cpu for this time ... WTF is this RVDS is all about? No message, no way to see exceptions, no message boxes to tell me what&amp;#39;s wrong...&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RVDS profiler for arm and exceptions, broken?</title><link>https://community.arm.com/thread/1234?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:57:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:20a45719-bc43-416e-8f42-1c38c1f13290</guid><dc:creator>fdsftrq gfdgfdsgfds</dc:creator><description>&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RVDS profiler for arm and exceptions, broken?</title><link>https://community.arm.com/thread/1235?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:57:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a631b770-15a2-4d40-b7f5-6b56ff608cf8</guid><dc:creator>fdsftrq gfdgfdsgfds</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 25th March 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;It&amp;#39;s quite possible for invalid code to work on one target or with one compiler or at one optimization level and not work on another target or another compiler or another optimization level.&amp;#160; It&amp;#39;s also quite possible that code is fine and you&amp;#39;ve encountered problems with the tools.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span&gt;I agree, but I&amp;#39;m quite confident that there is no problem with the code, it&amp;#39;s production code taken from android, it doesn&amp;#39;t use any quirks, it&amp;#39;s pretty standard c code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;I think the &amp;quot;ARM Profiler WARNING&amp;quot; can be ignored for the time being; it&amp;#39;s just telling you that the call chain information will be incomplete.&amp;#160; I don&amp;#39;t think it&amp;#39;s having any effect on the execution&amp;#160; You may be able to avoid the warning by disabliing data compression at link-time (I vaguely remember data decompression bogusly causing this warning).&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Yes, you are right. I&amp;#39;m not worried about the warning. If I use linker manually I can pass &amp;quot;--datacompressor off &amp;quot; to disable this compression warning.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Do you mean that you can run (without profiling) the same image on the RTSM with no problem but when you try to profile it on the RTSM (without rebuilding) it has the exceptions problem?&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;Yes, that&amp;#39;s exactly what I mean. I used the same binary and it runs from the debugger and produces correct output at the end. It&amp;#39;s most likely some sort of bug of the emulator.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; Unfortunately I don&amp;#39;t think it&amp;#39;s possible to debug during the profile run to find out what is causing the exception.&amp;#160; It might be worthwhile trying to include exception handlers that emit a message to find out which exception is happening and what the registers are (especially R14) when it happens.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I don&amp;#39;t know how to trap this exceptions and how to print any output about them. Is there any simple example so that I could try it?&lt;/span&gt;&lt;br /&gt;&lt;span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;#160; What happened when you used the versions of memcmp, etc. that are supplied with the tools?&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I had identical problem: exception graph would go high from start and the instruction counter would go low, the program would never complete. I wasn&amp;#39;t sure what was the source of problem, but when I replaced all calls to memcmp and others, the problem was gone. If I simply plug in original function call in any place, the problem will show up.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;#160;&amp;#160; Do you mean you can build it with gcc on run it sucessfully on a real ARM target?&lt;br /&gt;Have you tried running and/or profiling the gcc-built version on the RTSM?&lt;br /&gt;Are you using your version of memcmp, etc. with the gcc-built version?&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span&gt;I build mainly for Windows CE, simply because i really like MS tools. Their arm compiler is old, but it provides quite good performance in my benchmarks. I use cegcc to compile for WinCE as well (cegcc allows inline asm, whereas ms compiler does not other than limited number of some intrinsics) and when I use cegcc everything works fine without changing std functions off course.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; The profiler may be able to help (after the exceptions problem is resolved) but the RTSM does not accurately model the timing of NEON instructions and memory access (and it is only approximate for others).&amp;#160; It is accurate about the number of times a function/instruction was executed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t see the -O3 -- is it somewhere else?&lt;br /&gt;&lt;br /&gt;Have you contacted ARM support (sw-support@arm.com) about this problem?&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m sure that this code does not have any bugs (buffer overruns, reading random memory etc) because I used it the same code in different operating systems for quite some time. I never had any problem except profiler from RVDS. This is a voice codec library (amr-wb) and the test program that I run basically runs some test vectors to verify that output is binary exact. You don&amp;#39;t see -O3 in the screenshot simply because I tried different settings.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Simply by changing compiler settings I can make the build not runnable from profiler. It does nto work if I use cortex-a8 as CPU target, but it works if I use --cpu=7-A.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;The code doesn&amp;#39;t actually use any NEON at all (it&amp;#39;s plain c), I have some neon asm, but simply by including these files into the build (even without referencing these neon functions) the resulting binary become non-runable in the profiler.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I did not contact arm about this issue. I simply downloaded the trial to try their tools and I posted about my experience here.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RVDS profiler for arm and exceptions, broken?</title><link>https://community.arm.com/thread/1233?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2013 10:57:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bdc0802a-1a79-465e-9be1-ba7a2dded16c</guid><dc:creator>Scott Douglass</dc:creator><description>&lt;div&gt;&lt;i&gt;Note: This was originally posted on 25th March 2011 at &lt;a href="http://forums.arm.com"&gt;http://forums.arm.com&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;This code works properly on real device, so I know it works, but in RVDS emulator it does not work.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;It&amp;#39;s quite possible for invalid code to work on one target or with one compiler or at one optimization level and not work on another target or another compiler or another optimization level.&amp;#160; It&amp;#39;s also quite possible that code is fine and you&amp;#39;ve encountered problems with the tools.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I think the &amp;quot;ARM Profiler WARNING&amp;quot; can be ignored for the time being; it&amp;#39;s just telling you that the call chain information will be incomplete.&amp;#160; I don&amp;#39;t think it&amp;#39;s having any effect on the execution&amp;#160; You may be able to avoid the warning by disabliing data compression at link-time (I vaguely remember data decompression bogusly causing this warning).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;That same build runs without any issues with the debugger, but from profiler it has this problem.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Do you mean that you can run (without profiling) the same image on the RTSM with no problem but when you try to profile it on the RTSM (without rebuilding) it has the exceptions problem?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Unfortunately I don&amp;#39;t think it&amp;#39;s possible to debug during the profile run to find out what is causing the exception.&amp;#160; It might be worthwhile trying to include exception handlers that emit a message to find out which exception is happening and what the registers are (especially R14) when it happens.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt; I had to rewrite (provide my own implementations) of memcmp, memcpy etc, otherwise I wasn&amp;#39;t able to use profiler at all &lt;/blockquote&gt;&lt;br /&gt;&lt;span&gt;What happened when you used the versions of memcmp, etc. that are supplied with the tools?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;This code works on real devices, I build it with GCC ...&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Do you mean you can build it with gcc on run it sucessfully on a real ARM target?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Have you tried running and/or profiling the gcc-built version on the RTSM?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Are you using your version of memcmp, etc. with the gcc-built version?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;I have handcoded neon code and I wanted to profile the code to see what kind of improvement it gives me, &lt;/blockquote&gt;&lt;br /&gt;&lt;span&gt;The profiler may be able to help (after the exceptions problem is resolved) but the RTSM does not accurately model the timing of NEON instructions and memory access (and it is only approximate for others).&amp;#160; It is accurate about the number of times a function/instruction was executed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;CFG = --arm --cpu=6K -Otime -g&lt;/blockquote&gt;&lt;br /&gt;&lt;span&gt;I don&amp;#39;t see the -O3 -- is it somewhere else?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;Have you contacted ARM support (&lt;/span&gt;&lt;a href="mailto:sw-support@arm.com"&gt;sw-support@arm.com&lt;/a&gt;&lt;span&gt;) about this problem?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>