Skip to content

can not generate prof.fdata for libc.so #162795

@zhouyu0502

Description

@zhouyu0502

1.i have a process which use both example.so and libc.so.6(using in arm64 platform and corss-compile in x86)
but i found that for example.so,it can generate prof.fdata successfully after i use instrumentation-file-append-pid or instrumentation-sleep-time

however for libc.so.6
if i use --instrumentation-sleep-time

  • ./llvm-bolt libc.so.6 --instrumentation-sleep-time=30 -o libc.so.6.30s
  • BOLT-INFO: shared object or position-independent executable detected
  • BOLT-INFO: Target architecture: aarch64
  • BOLT-INFO: BOLT version: 6abb626
  • BOLT-INFO: first alloc address is 0x0
  • BOLT-INFO: creating new program header table at address 0x200000, offset 0x200000
  • BOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it.
  • BOLT-INFO: enabling relocation mode
  • BOLT-INFO: number of removed linker-inserted veneers: 0
  • BOLT-INFO: 0 out of 3238 functions in the binary (0.0%) have non-empty execution profile
  • BOLT-INFO: removed 402 empty blocks
  • BOLT-INFO: UCE removed 2 blocks and 8 bytes of code
  • BOLT-INFO: Starting stub-insertion pass
  • BOLT-INFO: Inserted 0 stubs in the hot area and 0 stubs in the cold area. Shared 0 times, iterated 1 times.
  • BOLT-INFO: patched build-id (flipped last bit)

it can not generata prof.fdata in /tmp/ which is writable

if i use --instrumentation-file-append-pid

  • `llvm-bolt libc.so.all.6 --instrumentation-file-append-pid -o libc.
  • so.6.appendpid
  • BOLT-INFO: shared object or position-independent executable detected
  • BOLT-INFO: Target architecture: aarch64
  • BOLT-INFO: BOLT version: 6abb626
  • BOLT-INFO: first alloc address is 0x0
  • BOLT-INFO: creating new program header table at address 0x200000, offset 0x200000
  • BOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it.
  • BOLT-INFO: enabling relocation mode
  • BOLT-INFO: number of removed linker-inserted veneers: 0
  • BOLT-INFO: 0 out of 3238 functions in the binary (0.0%) have non-empty execution profile
  • BOLT-INFO: removed 402 empty blocks
  • BOLT-INFO: UCE removed 2 blocks and 8 bytes of code
  • BOLT-INFO: Starting stub-insertion pass
  • BOLT-INFO: Inserted 0 stubs in the hot area and 0 stubs in the cold area. Shared 0 times, iterated 1 times.
  • BOLT-INFO: patched build-id (flipped last bit)`

it can generata prof.fdata but the size is 0 which means nothing collects

please tell me how can i debug? THANKS!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions