RudjiGames / MTuner

MTuner is a C/C++ memory profiler and memory leak finder for Windows, PlayStation 4 and 3, Android and other platforms
BSD 2-Clause "Simplified" License
2.63k stars 145 forks source link

Compiling on Linux #1

Closed jaw closed 7 years ago

jaw commented 7 years ago

seems interesting, one thing though, how difficult would it be to compile for Linux?

milostosic commented 7 years ago

Compiling it... not so much work but the rest of functionality (process injection, allocation hooking, etc.) would be substantially more. It's something I'll slowly be working on but it's not high priority - contributions are welcome though!

jaw commented 7 years ago

there's an LD_PRELOAD mechanism on Linux, maybe that can be used? Dunno how complex your recorder is...

milostosic commented 7 years ago

Yes, I'm aware of it and it's likely I'll be using that. Recording code is quite simple, you can see it here: https://github.com/milostosic/rmem Generally, MTuner is just data visualizer with some additional functionality for process injection. Now, with that being said, a subset of functionality allowing to profile (visualize) on Linux would be much easier to do - the only limitation is that applications would have to link against rmem and record captures "manually". Probably this will be the first step but can't commit to any specific time frame right now :/

JodiTheTigger commented 7 years ago

I've tried compiling it on linux (ArchLinux-64) make linux-debug64 -j8 first it fails with lua: /home/richard/Code/MTuner/build/qtprebuild.lua:11: module 'lfs' not found: so I had to install lua-filesystem sudo pacman -S lua-filesystem

now it fails with

lua "/home/richard/Code/MTuner/build/qtprebuild.lua" -uic "/home/richard/Code/MTuner/rqt/src/rqt_widget_categorized_list.ui" "" rqt
rqt_pch.h
../../../../../rqt/src/rqt_pch.h:17:10: fatal error: QtCore/QByteArray: No such file or directory
 #include <QtCore/QByteArray>
          ^~~~~~~~~~~~~~~~~~~

I have

richard@quaff ~/C/M/MTuner> qmake --version
QMake version 3.1
Using Qt version 5.9.1 in /usr/lib
milostosic commented 7 years ago

If you'd like to see what's going on you should look at qtpresets5.lua There you can see the setup of include dirs and the rest... I'll probably take a look during weekend.

QMake isn't used at all.

dragonmux commented 7 years ago

I've begun working my way through the process of doing necessary work to get the code building on Linux - see #11 .

obfuscated commented 7 years ago

@milostosic You could probably look at heaptrack and take some ideas from it. It is the most advanced memory debugging tool on linux as far as I know.

milostosic commented 7 years ago

MTuner now compiles on Linux. I will close this issue as it's about compilation. Full functionality on Linux is still WIP.