performance analyzer: how to see functions written in assembly ?

I have written several functions and the SysTick handler in an assembly file (randsched_arm_cortex_m.S)

When I run the simulator and look at the performance analyzer, the only thing showns under randsched_arm_cortex_m.S is "__asm_54C"  (0x54C is the address of the first function defined in that file). I could work with raw addresses instead of function names, my point is that the performance analyzer just show one entry for the entire file whereas I expect one entry per function / handler.

I guess I have to include some additional directive for each function, but I could not figure out which one so far.

My file starts with:

.syntax unified
.cpu cortex-m3
.fpu softvfp
.thumb



.section .text

and my Systick handler is defined as:

.global SysTick_Handler
.thumb_func
    .type   SysTick_Handler, %function
SysTick_Handler:

I use the following:

IDE-Version:
µVision V5.42.0.0
Copyright (C) 2025 ARM Ltd and ARM Germany GmbH. All rights reserved.

License Information:
sebastien riou
PQShield
LIC=----

Tool Version Numbers:
Toolchain: MDK-Lite Version: 5.42.0.0
Toolchain Path: C:\Users\sebas\AppData\Local\Keil_v5\ARM\ARMCLANG\Bin
C Compiler: ArmClang.exe V6.23
Assembler: Armasm.exe V6.23
Linker/Locator: ArmLink.exe V6.23
Library Manager: ArmAr.exe V6.23
Hex Converter: FromElf.exe V6.23
CPU DLL: SARMCM3.DLL V5.42.0.0
Dialog DLL: DCM.DLL V1.17.5.0
Target DLL: UL2CM3.DLL V1.164.14.0
Dialog DLL: TCM.DLL V1.56.6.0

Parents
  • whereas I expect one entry per function / handler.

    That expectation is not well rooted in facts.  Assembly code, as such, does not recognize concepts like "function" or "handler" --- in particular it will not usually come with the kind of debug information that the anallyzer would need to distinguish such entities from each other.

    Which usually make the easiest correct answer to your question the traditional but dreaded "Don't do that, then".  Or, if you're absolutely sure you have to, either 

    a) do it as inline assembly code inside C functions or

    b) compile a throw-away C implementation into assembly code so you'll inherit the debug information necessary to feed the analyzer.

Reply
  • whereas I expect one entry per function / handler.

    That expectation is not well rooted in facts.  Assembly code, as such, does not recognize concepts like "function" or "handler" --- in particular it will not usually come with the kind of debug information that the anallyzer would need to distinguish such entities from each other.

    Which usually make the easiest correct answer to your question the traditional but dreaded "Don't do that, then".  Or, if you're absolutely sure you have to, either 

    a) do it as inline assembly code inside C functions or

    b) compile a throw-away C implementation into assembly code so you'll inherit the debug information necessary to feed the analyzer.

Children
No data