What are the steps / strategy for analyzing and improving embedded system performance

I will examine this question in the subtitles. I am confused if I ask them separately or in one question. So I will just stick to one SO question.

  • What are usually the steps to analyze and improve the performance of C applications?

  • Have these steps changed if I design for an embedded system?

  • What tools can help me?

Recently, I was tasked with improving the performance of our product on the ARM11 platform. I am relatively new to this field of embedded systems and need a guru here to help me.

+5
source share
6 answers

C . GCC , gcc 3.x , 4.x. , ARM , gcc. 3 4 . LLVM GCC 4.x, , gcc - . gcc, 3.x 4.x, gcc. Metaware adt gcc3.x, gcc3.x gcc4.xa , gcc4.x 2 ( ) gcc4.x . , ().

LLVM , gcc. , (ver 27) gcc 4.x , . n ( , , C bc , bc , , , llc ).

, . ARM11, arm11 generic arm? , , / (, armv6) armv4 (ARM7), . -O2 -O3, .

, . , - , 16 . Thumb , , , , gba , .

11, , , L1 , , L2-, ? ? mmu ? ? , , , , , , , nops ( , , , , ), 10-20 . , - /, . , , ( 3 2 2 1, ).

, , - , . C, , ( C ) C-, , memcpy, . 32 64- , , //memcpy, 32 64 , ( ). , ( , , , ) , , , 32- . ( , ). GBA , , , , , , , , C . Memcpy - , memcpy , 64 128 .

. , , , , , . , , .

, , , , , , , , , , , . C , , , . , , , ( , ). , , , , , , , / , . , , .

, , , . , , , , , , , . , .

. , -, . , , , .. , . , C . 32 * 32 = 32 , C, , , , ( ).

, , , , float, . float, pandora. :

float a,b;

...

a = b * 7.0;

, C . float - .

( ), - . , , , , , , -, , , , , , . nops start.S , , , , , , . 10-20 .

+4
+1

!! !

, C ?

, , PC-Lint, . , , - C/++.

, ; , , , .

, .. , ! , . , , , , ( ), , .

, . , , , 3 , " ?".

: . /, . , , , , , , (, , , " " / ).

" , ?"

; , "", , . , chearful , , .

, , , , .

, ?

IDE, , , , , , , ( ) ( ).

!

+1

.

  • , . , .
  • GCC #pragma GCC optimize("O3") .
  • ( ).
+1

, , - , :

ARM System-on-Chip, -

ARM - - Andrew N. Sloss, Dominic Symes, Chris Wright John Rayfield

ARM Cortex-M3 -Joseph Yiu

C -

C - .

C ++ -

--David E, Simon

3- - -

- - G. . .

: , - Gunter Hommel Sheng Huanye

-

-

0
  • . . , , , . , .

  • , .

  • , :

    Windows: AMD, VTune, Sleepy

    Linux: valgrind/callgrind/cachegrind

    Mac: Xcode .

Try to find a profiler for the architecture that you are actually working on.

-1
source

All Articles