mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-17 10:24:49 +00:00
![]() When converting a U-Boot trace records file to ftrace function graph format for use by trace-cmd ('proftool -f funcgraph dump-ftrace'), the time associated to each function is incorrectly saved in microseconds instead of nanoseconds. Multuply the value by 1000 to fix the issue. With this change, the trace-cmd output looks consistent. Here is an example with udelay(25) added to mem_malloc_init() as a test case: $ ./tools/proftool -m System.map -t /tmp/trace.bin -f funcgraph \ dump-ftrace -o /tmp/trace.dat $ trace-cmd report /tmp/trace.dat >/tmp/trace.log $ vi /tmp/trace.log [...] u-boot-1 [000] 6.719659: funcgraph_entry: | mem_malloc_init() { u-boot-1 [000] 6.719659: funcgraph_entry: | udelay() { u-boot-1 [000] 6.719660: funcgraph_entry: | schedule() { u-boot-1 [000] 6.719660: funcgraph_entry: | cyclic_run() { u-boot-1 [000] 6.719660: funcgraph_entry: 1.000 us | cyclic_get_list(); u-boot-1 [000] 6.719661: funcgraph_exit: 1.000 us | } u-boot-1 [000] 6.719661: funcgraph_exit: 1.000 us | } u-boot-1 [000] 6.719661: funcgraph_entry: | __udelay() { u-boot-1 [000] 6.719662: funcgraph_entry: 0.000 us | usec_to_tick(); u-boot-1 [000] 6.719687: funcgraph_exit: + 26.000 us | } u-boot-1 [000] 6.719687: funcgraph_exit: + 28.000 us | } u-boot-1 [000] 6.719687: funcgraph_entry: # 37971.000 us | memset(); u-boot-1 [000] 6.757658: funcgraph_exit: # 37999.000 us | } u-boot-1 [000] 6.757658: funcgraph_exit: # 38000.000 us | } In the above dump, the udelay() call is reported as taking 26 us which is consistent with the timestamps (6.719687 - 6.719659 = 0.000026). Without this patch we would have "0.026 us" instead of "+ 26.000 us". Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> |
||
---|---|---|
.. | ||
binman | ||
buildman | ||
docker | ||
dtoc | ||
env | ||
gdb | ||
kermit | ||
libfdt | ||
logos | ||
omap | ||
patman | ||
scripts | ||
u_boot_pylib | ||
.gitignore | ||
aisimage.c | ||
aisimage.h | ||
asn1_compiler.c | ||
atmel_pmecc_params.c | ||
atmelimage.c | ||
bmp_logo.c | ||
default_image.c | ||
dumpimage.c | ||
dumpimage.h | ||
eficapsule.h | ||
efivar.py | ||
endian-swap.py | ||
envcrc.c | ||
expo.py | ||
fdt_add_pubkey.c | ||
fdt_host.h | ||
fdtgrep.c | ||
file2include.c | ||
fit_check_sign.c | ||
fit_common.c | ||
fit_common.h | ||
fit_image.c | ||
fit_info.c | ||
gen_eth_addr.c | ||
gen_ethaddr_crc.c | ||
getline.c | ||
getline.h | ||
gpheader.h | ||
gpimage-common.c | ||
gpimage.c | ||
ifdtool.c | ||
ifdtool.h | ||
ifwitool.c | ||
image-host.c | ||
image-sig-host.c | ||
imagetool.c | ||
imagetool.h | ||
img2srec.c | ||
imx8image.c | ||
imx8m_image.sh | ||
imx8mimage.c | ||
imx9_image.sh | ||
imx_cntr_image.sh | ||
imximage.c | ||
iot2050-sign-fw.sh | ||
jtagconsole | ||
Kconfig | ||
key2dtsi.py | ||
kwbimage.c | ||
kwbimage.h | ||
kwboot.c | ||
lpc32xximage.c | ||
Makefile | ||
microcode-tool | ||
microcode-tool.py | ||
mips-relocs.c | ||
mkeficapsule.c | ||
mkenvimage.c | ||
mkexynosspl.c | ||
mkfwumdata.c | ||
mkimage.c | ||
mkimage.h | ||
mksunxiboot.c | ||
mtk_image.c | ||
mtk_image.h | ||
mtk_nand_headers.c | ||
mtk_nand_headers.h | ||
mxsboot.c | ||
mxsimage.c | ||
mxsimage.h | ||
ncb.c | ||
netconsole | ||
omapimage.c | ||
omapimage.h | ||
os_support.c | ||
os_support.h | ||
pbl_crc32.c | ||
pbl_crc32.h | ||
pblimage.c | ||
pblimage.h | ||
prelink-riscv.c | ||
prelink-riscv.inc | ||
printinitialenv.c | ||
proftool.c | ||
qconfig.py | ||
relocate-rela.c | ||
renesas_spkgimage.c | ||
renesas_spkgimage.h | ||
rkcommon.c | ||
rkcommon.h | ||
rkimage.c | ||
rkmux.py | ||
rksd.c | ||
rkspi.c | ||
rmboard.py | ||
sfspl.c | ||
socfpgaimage.c | ||
spl_size_limit.c | ||
stm32image.c | ||
sunxi-spl-image-builder.c | ||
sunxi_egon.c | ||
sunxi_toc0.c | ||
termios_linux.h | ||
ublimage.c | ||
ublimage.h | ||
update-subtree.sh | ||
update_octeon_header.c | ||
vybridimage.c | ||
zynqimage.c | ||
zynqmp_pm_cfg_obj_convert.py | ||
zynqmp_psu_init_minimize.sh | ||
zynqmpbif.c | ||
zynqmpimage.c | ||
zynqmpimage.h |