327 questions
0
votes
1
answer
61
views
How to exclude a function from Gprof activity during running
Suppose i have function foo
void foo()
{
//do something
}
Now this fn foo is now called by other function defined in other files. if gprof is enabled it would do profiling activity and subroutines ...
2
votes
1
answer
76
views
Empty profile with -p on gcc [closed]
I have 2 projects in c. They both are configured with CMake using similar CMakeLists.txt. The first generates gmon.out file normally. It can be seen with gprof. The second generates barely empty gmon....
0
votes
1
answer
72
views
customizing gccs code coverage methods for embedded targets
i need to do code coverage in several very resource constrained device in bare metal.
when i try to enable this stuff my ram usage doubles and code size blows up nothing fits.
its functionally not ...
1
vote
1
answer
51
views
How can I profile my dynamic memory allocator?
I'm developing my own allocator and using the LD_PRELOAD environment variable to interpose libcs malloc function.
I want to profile my code when running some applications, such as measuring the time ...
2
votes
1
answer
252
views
using gprof -pg flag doesn't generate gmon.out
I have a code that is a mix of Fortran, C and R. it's a simulation code. The backend/solver is in Fortran and C and R is used as the wrapper for creating simulation workflow and launching the process.
...
1
vote
1
answer
519
views
What does the filename "gmon.out" stand for?
The GNU compiler toolset has a profiler "gprof" for performance analysis of C++ programs. With the -pg switch, the gcc compiler will make executables that write a data file, "gmon.out&...
1
vote
0
answers
44
views
Filtering callgrind capture based on shared library name
I would like to have a coarse filter for my callgrind output.
If I ask callgrind to capture a run, I want to tell it to prune at a .so level.
For instance, I would like to tell it that it should not ...
0
votes
0
answers
357
views
Undefined symbol "_mcount" when cross-compiling for aarch64
I'm trying to use gprof for a project that runs in a small embedded OS (https://github.com/smartobjectoriented/so3). Compilation for this OS is done using the "aarch64-none-linux-gnu-" ...
0
votes
1
answer
188
views
Can I analyze tcmalloc heap profile dump without golang being part of my environment (pprof can't be installed without go)?
Due to certain restrictions I can not have golang as part of my environment. I would like to use the HEAPPROFILE generated by tcmalloc. To the best of my knowledge only way to make it human readable ...
3
votes
2
answers
2k
views
C profiler/tracer with timeline view
I am trying to get into C language and looking for a profiler or tracer tool that supports timeline view representation with every function calls. Something like tracing via PHP xDebug. Where all ...
1
vote
0
answers
278
views
How to solve problem using gcc -pg on alpine?
I have dockerfile:
FROM alpine:3.18.2
WORKDIR /app
RUN apk add gdb gcc musl-dev make binutils
COPY ./src /app
RUN gcc main.c -pg -o app
But compilation fails with an error:
/usr/lib/gcc/x86_64-alpine-...
1
vote
0
answers
145
views
GNU gprof showing calls in seconds instead of milliseconds
Is there an option i am missing that i couldnt find? i have searched the internets and all the articles show the flat profile in milliseconds without any added option tags, but my gprof outputs the ...
0
votes
0
answers
43
views
unable to understand gprof output
I have captured the gprof profiler output while running a c++ program. I got below logs
I found that there are two functions which are consuming most time ie receiveXappMessages and load() function. I ...
0
votes
0
answers
112
views
gprof's output gmon.out not appearing when cancelling slurm job before its finish
I am profiling a Fortran code with gprof.
I run this code on a cluster, where I request 24 cores from 1 node.
The job is submitted via slurm.
The command to run the code, inside the submission.sh I ...
2
votes
1
answer
3k
views
How do one visualize gprof profiling data as a flamegraph?
I've profiled a C++ application using GNU gprof. It would be really nice to visualize the data and for that purpose I found a python utility gprof2dot, which creates a graph from the gprof data, nice! ...