I built MonoDevelop using these instructions. I compiled a console application with it and it's running on a Linux machine. I have noticed a memory leak and would like to track it and figure out what is being leaked.
According to these instructions, I must start the application with specific options in mono. At that point, the profilier will dump an MLPD file. I now have that file and would like to view it and see what's going on. I can not find this mprof-report program anywhere.
Has it been depricated? If so, how do we profile mono applications now? There isn't much about it online.
Thank you!
Has it been depricated?
No, it is a part of the Mono distribution and is a C-based program so it is a "native" binary and located in the "bin" directory along with mono, mono64 pedump, monograph, monodis, etc..
On MacOS these are located in:
file `which mprof-report`
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mprof-report: Mach-O 64-bit executable x86_64
Man page:
NAME
mprof-report - report generator for Mono's log profiler
SYNOPSIS
mprof-report [option]... file.mlpd
DESCRIPTION
mprof-report is the report generator for Mono's log profiler. It reads the MLPD log
files produced by the log profiler and generates a report based on the options passed
to it. The output is based on individual reports which can be turned on or off. By
default, all reports are generated in summary form (i.e., non-verbose output).
mprof-report can read both normal and gzip(1)-compressed log files transparently.
For information about how to use the log profiler with a program, see the mono-pro-
filers(1) page, under the LOG PROFILER section.
~~~~~
Related
I have an old system which connects to my custom hardware that I will be delivering simple HTML out of.
If I wanted to waste electricity, I'd have two computers constantly running and then I can test my pages on the fly.
Instead, I want to do all my work on one computer my linux system.
Currently I can serve CGI pages through Apache in Linux and those are compiled C programs.
But because the target computer has Quick Basic and I compile EXE files through that language, I can do the same on my linux computer through DOSBOX.
The nice news is I can execute my Quick Basic program on a unix commandline via the linux WineConsole command and the output prints correctly despite the warning messages printed to stderr.
The sad news is I can't find a way to load my EXE as if it was part of a URL in a browser and have the same contents shown in the browser itself as what I saw on the commandline.
My only guess is to find a specialized apache module that can allow me to associate extensions with programs but I don't know of such a module.
Is there another way one can run an EXE file in linux apache and have the standard output contents dumped to the screen?
Have you tried using dosemu instead of dosbox?
If dosemu is able to output to stdout, you can wrap it inside a shell script that will be your CGI
If you aren't using DOS specific routines in your basic code, you might be better of compiling it as a linux executable using a basic compiler for linux.
You might want to look into this. I know there is a compiler called FreeBasic which should be able to compile QuickBasic code to a linux executable.
I'm developing a cross-platform desktop application for Mac, Linux and Windows. The application will create a plain-text log file to help with debugging, amongst other things. What are people's recommendations for a sensible place to store the log on each of the platforms?
Here is my guess so far, based on web searches:
Mac: ~/Library/Logs/MY-APP-NAME/system.log
Linux: ~/.MY-APP-NAME/logs/system.log
Windows: %APPDATA%\MY-APP-NAME\logs\system.log
For Linux, the XDG Base Directory Specification is followed by some applications. Log files are not specifically called out as such. You can put them either into a subdirectory of the data directory ($XDG_DATA_HOME or $HOME/.local/share), where they will not be deleted automatically, or you could use a subdirectory of the cache directory ($XDG_CACHE or $HOME/.cache). In the latter case, the files could be automatically expired after some time.
I just try to set up Valves Source SDK 2013 for Linux but I need to say that I find the wiki + documentation rather confusing and partly heavily outdated (Windows-only instructions, only for GoldSrc / pre-20XX SDk etc.).
I hope that someone who already has gone through the hassle can supply me with some hints on how to correctly set up the system.
I tried to use some Windows-specific instructions to understand the system but some are highly platform-specific.
So here is the current status (I based what I did on this wiki page: Wiki: Source SDK 2013:
The source of the SDK SDK 2013 from GitHub is cloned to
~/Git/source-sdk-2013/
the SDK Base 2013 installed via Steam and the steam-runtime to
~/working/steam-runtime-sdk_2013-09-05/
I was not sure whether there is a specific path I should put the steam runtime into so I just put it into my self-created working dir.
# Create a Multiplayer sample project
export SDKROOT="~/Git/source-sdk-2013"
bash $SDKROOT/mp/src/creategameprojects
bash $SDKROOT/mp/src/createallprojects
# Setup Steam Runtime
export STEAMRT="~/working/steam-runtime-sdk_2013-09-05/"
cd $STEAMRT
# Choose all build targets (i386 + amd64) and download these
./setup.sh
# Set current to target to the same as host machine (ie. amd64)
./shell.sh
# Compile the actual game
make -f $SDKROOT/mp/src/games.mak
I have not yet touched any source files as there's plenty of sources already supplied. I just wanted to confirm having a working toolchain set up
This all compiles fine but in the end the script wants to chmod the client.so and server.so but claims "not found" – but it sadly does not provide any information where it searched for them. Actually these are existant in
$SDKROOT/mp/game/mod_hl2mp/bin
and even marked as executable (-rwxr-xr-x).
So I just ignored this and hoped for the best. The next line to me sounds a bit strange:
At this point you should have client.so and server.so files to load with the Source SDK Base 2013 of your choice.
So I should be able so load the files with "the Source SDK Base 2013" (of your choice?!? Valve is the only one providing it O.o). How am I supposed to do that? I have not found any hint whatsoever for that, sadly.
But they hint me to the README.txt of the steam-runtime which tells me to do this:
run.sh ./MyGame
But where's the executable? I only have .so's
And this is the point where I currently am. I'm quite confused as I have many questions now:
Why do only the Linux users need to download the steam runtime? What if I want to not ship via Steam?
Is that chmod failure a script failure or a mistake in my directory setup?
How do I load these libraries via the SDK Base
Where is the binary? I'm quite confused here...
Have I overlooked something?
I appreciate any hints or links to resources, maybe explanations when I just were to dumb to understand what they mean :P
EDIT: Actually there is a GitHub repo for the steam-runtime too (GitHub/steam-runtime) – why is the download so outdated, the git repo has some updated stuff going on. Which should one choose?
With the help of a friend I didn't expect to be able to answer this (he didn't know about Linux but we could figure it out) I could solve it faster than expected.
To "load" the game via the Steam SDK Base just append the -game parameter and point it to the directory with the gameinfo.txt (ie. $SDKROOT/mp/game/mod_hl2mp/) in it.
Alternatively just copy the contents of this directory to
~/.local/share/Steam/steamapps/sourcemods/$MYSOURCEMOD
where $MYSOURCEMOD is how you want to call it (do not use spaces). Then add a steam.inf file in that dir with following content:
appID=243750
ProductName=$MYSOURCEMOD
PatchVersion=1.0.0.0
After a restart Steam will be able to find the sourcemod.
I'm not quite sure what the "steam-runtime" thingy is but I suppose it is to set up the build environment (to use a custom gcc etc.) as this is how the scripts look like. I'm not sure why you should run the game via the run.sh in the bin/ subfolder of the runtime instead of via Steam or via the parameter one the Source SDK Base but maybe someone can enlighten me here.
The archive one shall download is only a downloader/configurator for the steam-runtime hosted on GitHub.
This is a more general and noob question. I am developing a small application in Linux (Ubuntu, to be more precise) and at this point I have an executable, a shared library (.so), a configuration file (.conf) with some settings to be read by the application at the beginning, a data folder with images and other resources to be used during the application life-time (resources that can be also modified, deleted) and of course, I would need some file for logs and messages (right now I am using syslog).
So, my question is, where should each one of these be stored when the application is installed on a client's computer? What is the standard way of organizing all the application's files in Linux? On Windows everything would be found usually in the C:\Program Files\(App Folder) but it looks like on Linux things are more (or less) organized. Can you give me some advices on this matter?
Program data were historically stored in dot-prefixed folders in user's home directory. Modern Linux distributions tends to use ~/.config/program_name folder.
For all files that will not be modified after distibution follow Linux standard:
Ex: project dir: ABC
sub directories:
logs - keep log files
conf - keep configuration files here
bin - executable binaries here
traps - any trap mesg
then depend on what application we develop
Along with you can set level for starting your application from boot level if required.
I have an VC++ exe in Remote (customer end).They are repoterd that crashing has occurred.How to identify the problem cause without using the source code and i want to use only .pdb file to analyse .Please tell me how to use .pdb file for debugging.
As a first step get the crash dump using WIndbg or DebugDiag
Please check with customer whether it is ok to install any of the above mentioned tools and get the dump.
Ask thecustomer to send the dump for the crash of the particular exe that you are saying is crashing.
Next analyse the dump file using windbg or debugdiag in your machine using the right pdb.
please tell if any more information is required.
Minimal help for analysing the dump will be given in the help files of windbg or debugdiag itself.
You can also open dump and mini dump files in Visual Studio as well (Open them with Open Project... and point at the dmp file.) If you have pdb files that is properly indexed, you can often get a proper call stack that will point you to where the error occurred.
You should also check out Windows Error Reporting. If this is commercially available software, I suggest you sign your binary files before deployment. You can then ask the customers to submit errors to Microsoft through their standard Windows Error Reporting Service.
On the other side, you can sign up on their WER portal and identity yourself with the certificate you signed the binaries with. From the portal you can get error statistics and download specific dump files.
If the software runs in an isolated environment - a private domain, you can push out a custom global policy in your active directory, that configures WER to submit dump files to a specific Windows share in your domain where the developers can collect them.
Hope this helps,
--larsw
Here are the initial steps to follow:
On the customer machine:
a. install windbg. this can be downloaded from the microsoft website.
b. once installed register the just in time debugger [windbg -l].
c. execute the application which is causing the crash.
d. the windbg will automatically open up when there is a crash.
e. save the dump file.
On your machine:
a. open the crash dump using windbg.
b. set the pdb files and source files on your machine in windbg.
c. You can generate pdb's using the project properties in visual studio.
More details I found in: http://kmdarshan.com/blog/2011/06/29/windows-debugging-using-windbg/