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

usage from command line broken #25

Closed milianw closed 6 years ago

milianw commented 6 years ago

I'm trying to use MTuner from the command line and it doesn't seem to be doing anything:

C:\Qt\src\training-material\addon\profiling\ex_string_comparison\build (master -> origin)
λ MTuner -p .\release\ex_string_comparison.exe
Copyright (c) 2017 by Milos Tosic. All rights reserved.

C:\Qt\src\training-material\addon\profiling\ex_string_comparison\build (master -> origin)
λ ls -latr
total 60
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 ../
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 debug/
-rw-r--r-- 1 milian 197121 15558 Nov 27 19:04 Makefile.Release
-rw-r--r-- 1 milian 197121 14991 Nov 27 19:04 Makefile.Debug
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 ./
-rw-r--r-- 1 milian 197121 14364 Nov 27 19:04 Makefile
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 release/

C:\Qt\src\training-material\addon\profiling\ex_string_comparison\build (master -> origin)
λ MTuner -p .\release\ex_string_comparison.exe -o mtuner.out
Copyright (c) 2017 by Milos Tosic. All rights reserved.

C:\Qt\src\training-material\addon\profiling\ex_string_comparison\build (master -> origin)
λ ls
Makefile  Makefile.Debug  Makefile.Release  debug/  release/

C:\Qt\src\training-material\addon\profiling\ex_string_comparison\build (master -> origin)
λ ls -latr
total 60
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 ../
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 debug/
-rw-r--r-- 1 milian 197121 15558 Nov 27 19:04 Makefile.Release
-rw-r--r-- 1 milian 197121 14991 Nov 27 19:04 Makefile.Debug
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 ./
-rw-r--r-- 1 milian 197121 14364 Nov 27 19:04 Makefile
drwxr-xr-x 1 milian 197121     0 Nov 27 19:04 release/

No error is being reported, but also no data file gets recorded as far as I can see. Please make this easier to use from the command line:

Thanks

milostosic commented 6 years ago

Are you sure it's "broken" ? Showing where it's recorded makes sense, I'll add that...

But do check here: C:\Users[your user name]\AppData\Roaming\MTuner

milianw commented 6 years ago

Yes, I'm sure it is broken. I just downloaded the last release and this is the behavior I'm seeing:

λ MTuner -p dir
Copyright (c) 2017 by Milos Tosic. All rights reserved.

Capture location: C:\Users\milian\AppData\Roaming\MTuner\

λ ls  C:\Users\milian\AppData\Roaming\MTuner\

I.e. the folder is empty. Also when I try to pass -o foo that file is not being generated.

milianw commented 6 years ago

In procmon I see this, which is also suspicious:

Process Create "C:\tools\MTuner\MTunerInject32.exe" #23#debug\lab_memory.exe#23# #23##23# #23#debug\#23#

This should be MTunerInject64.exe.

Furthermore, I then see this down the list:

CreateFile C:\Qt\src\training-material\addon\profiling\lab_memory\src\build-dbg\debug\debug\lab_memory.exe PATH NOT FOUND

This has the \debug part twice in the path...

milostosic commented 6 years ago

Thanks for taking the time to check it, I'll get this fixed as soon as I'm done with another issue.

milianw commented 6 years ago

Thanks. And take your time, no need to hurry. Especially considering there exists a workaround, by configuring the executable as a Project in MTuner and launching it from there.

milostosic commented 6 years ago

I just uploaded a new release that includes a fix for command line argument forwarding.