Questions tagged [massif]

62 questions
1
vote
2 answers

Working of the valgrind tool suite

I had run valgrind on a sample daemon program. The parent exits after allocating a chunk of 1000B, but the child that runs on the background keeps on allocating 200B of memory on the heap through malloc, after every two seconds. My question is:…
Akshaa
  • 91
  • 1
  • 3
0
votes
0 answers

If some variable(s) change value then save this new value in new variable(s)

There is some fixed list of variables that I need to keep track of, and if their values have changed, then save their new value in a new variable. How can this be done most compactly ? it is too long to use the if statement to check each variable,…
0
votes
1 answer

valgrind massif ms_print prints 0x0: ??? instead of stack

I use valgrind --tool massif to get the profile of memory, and then print it with ms_print. But 74% of memory shows 0x0: ???, does it means 74% of memory leak? ->74.11% (503,526,238B) 0x0: ??? | ->24.66% (167,561,216B) 0x5051C66:…
0
votes
1 answer

Valgrind/massif does not see memory deallocation done from another thread

While profiling the memory usage with valgrind/massif, I found it does not seem to see the memory deallocation done from another thread, reporting it as a leak. Here is an program that demonstrates that: #include #include…
nsh
  • 380
  • 3
  • 9
0
votes
2 answers

Memory release in pthread TLS destructor is not detected by valgrind/massif

Symptoms: I allocate TLS key with a destructor, create a bundle of threads and pass the TLS key to each thread. Each thread allocates memory and sets its pointer in TLS, the TLS destructor deallocates memory. I wait for threads to finish before app…
nsh
  • 380
  • 3
  • 9
0
votes
2 answers

Make valgrind to collect the data on request

I have got a memory leak which I'm trying to track with massif. The problem is that the leak happens always like couple of hours after an app is started. Now application that runs on massif is about 20 times slower than normal, thus for the leak to…
0
votes
1 answer

Valgrind massif tool reporting same snapshots

I need to run valgrind with the massif tool in a parallel code that takes a long time to finish. I want to take snapshots periodically. I do the following: valgrind --tool=massif --massif-out-file=outFile.txt --vgdb=yes ./app And in another…
Franks
  • 50
  • 8
0
votes
1 answer

Heap deallocation profiling

valgrind's massif tool is able to give me points in my code (including call stacks) where data is allocated. E.g. 99.97% (3,775,782,255B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. ->51.05% (1,928,081,040B) 0x37E712: MyFunc()…
joctee
  • 2,429
  • 1
  • 23
  • 19
0
votes
1 answer

General Protection Fault when using Valgrind

Apologies in advance for not adding code as I do not have permission to do so. I have a program that is crashing on certain systems after variable amounts of time ranging from 2-10s after starting with Valgrind massif tool. Running the same with…
Panda142308
  • 27
  • 13
0
votes
0 answers

How to create per-function memory profile of a multithreaded C++ program?

Problem: I have a multi-threaded C++ program, which handles quite some data (a few GB). At some point, my program runs out of main memory, which is something that I want to avoid. Theoretically, this should not happen, since the amount of data that…
User12547645
  • 6,955
  • 3
  • 38
  • 69
0
votes
0 answers

Massif visualizer can't display text in legend

I already generate a massif output file use command valgrind --tool=massif --time-unit=ms ./prog and then open this output file through massif visualizer. Most of them work well, but the text in label can't display properly(empty square) Are…
Steven
  • 811
  • 4
  • 23
0
votes
1 answer

Valgrind massif - inverse ignore?

Is there a parameter in valgrind massif that allows me to only track allocations made by certain functions and classes? I would like to make a run that only traces (de)allocations made by std::vector. Regards
Desperado17
  • 835
  • 6
  • 12
0
votes
1 answer

massif-visualizer for profiling multiple data structures

This is, I guess, a pretty common scenario for anyone doing performance studies. Suppose one has a few data structures, and would like to evaluate their space performance -- without counting using e.g. sizeof but rather in an empirical way. I model…
Ilonpilaaja
  • 1,169
  • 2
  • 15
  • 26
0
votes
0 answers

Troubleshooting an infinite allocation error

My application works fine for most inputs, but some input files make it allocate more and more memory at some point, until it is killed by the system's oom killer. The application takes multiple hours to run, so babysitting it and manually…
aqtth
  • 21
  • 2
0
votes
1 answer

Valgrind massif combine snapshots

I'm trying to profile an application with massif tool. I run it with this command: ./valgrind.bin --tool=massif --stacks=yes --heap=yes --trace-children=yes --vgdb=yes /usr/bin/agl_proxy The application runs for a very long time. Generally, when…
ilya1725
  • 4,496
  • 7
  • 43
  • 68