# Using valgrind with obs-studio



## SoFLUFFY (Nov 21, 2015)

Hi, new to obs development.

I'm trying to measure resource usage and generate a log on the recording feature of obs-studio, figured valgrind was a good place to start to gather more info beyond the standard console spitout. Doing this on a Mac running Yosemite.

But using valgrind memcheck with obs-studio seems to yield a bunch of errors which causes execution to stop and (probably resulting in) the GUI never opens. It spits out standard console outputs up to point where GUI is supposed to open, then finishes execution. Trying it with option --gen-suppressions=yes causes the program to hang at point where GUI is supposed to open and I start leaking memory until I force stop. After about 5 minutes of running/hanging at point right before GUI is supposed to open, it leaked about 16million bits.

A few friends tried running on Ubuntu and Fedora. The GUI runs, but there are leaks along w/ the errors and there it seem the program hangs after about 10 minutes recording.

Running obs-studio w/o Valgrind shows 'info: Number of memory leaks: 0'

Not deadset to Valgrind, so if anyone knows any other good performance testing tool (or can help me delve deeper into whatever is being used in dev if any), I'm open to other software that would help.

My system info:
Operating System: OSX 10.10.5
CPU: Intel Core i5-4278U, 2.60GHz
RAM: 8192MB
Kernel version: 14.5.0
Valgrind version 3.11
OBS Version: 0.12.0-21-g667768b

Thanks in advance!

P.S. Noticed in https://github.com/jp9000/obs-studi...646eaa22c27c57cd6/deps/jansson/CMakeLists.txt that valgrind in there but set to OFF. Not an expert in cmake; is valgrind disabled here? What's currently being used to scan and spit out memory/disk/cpu info?


----------



## Palana (Nov 22, 2015)

Try Instruments (comes with Xcode) or look at the (CPU) profiler data inside of OBS logs (and the profiler data dumps in ~/Library/Application\ Support/obs-studio/profiler_data)


----------



## SoFLUFFY (Nov 24, 2015)

Thanks, I'll take a closer look at instruments. Mind pointing me to the code that configures what and how the dumps generate? In the meantime I'll take a look at the profiler data dumps I've generated so far.


----------

