[Plugin] Performance profiler

EDIT: Okay, new problem:



I don't know if it means anything, but this is a 64-bit system!
Reply

Download https://github.com/Zeex/subhook and extract it to plugin/subhook
Reply

New issue...

Reply

Seems like I forgot to set the -m32 flag for some files. Try adding it to manually:

Код:
cmake -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32  .
Reply

Still having an issue getting through, but it's different errors at least!

Reply

http://stackoverflow.com/questions/7...e-or-directory
Reply

EDIT: That worked, thanks man!!

If anyone else needs it, feel free to D/L this one: http://realcop228.net/downloads/profiler_centos6_x64.so

As long as I stay updated with newer revisions, I'll continue to compile it on my Linux box if this works for people.

@xeeZ: If you want me to remove this just PM me!
Reply

[profiler] Attached profiler to 'gamemodes\TRPG.amx' (no debug info)

WHY And where is the info saved?
Reply

Compile the gamemode in debug mode (create a file named pawn.cfg, insert into it -d3)

--

Can you fix the downloads? Github says "There aren’t any uploads for this repository"
Reply

GitHub recently introduced their Releases feature as a replacement for the previously removed Downloads tab, so all the downloads are now here:

https://github.com/Zeex/samp-plugin-profiler/releases
Reply

Crash at the start, what's the problem?
Quote:

[16:38:41] [profiler] Loaded debug info from 'gamemodes\public.amx'
[16:38:41] [profiler] Attached profiler to 'gamemodes\public.amx' OnGameModeInit
[16:38:41] [debug] Server crashed while executing public.amx
[16:38:41] [debug] AMX backtrace:
[16:38:41] [debug] #0 00008858 in public SSCANF_OnGameModeInit () from public.amx
[16:38:41] [debug] #1 00001920 in public OnGameModeInit () from public.amx
[16:38:42] [debug] Native backtrace:
[16:38:42] [debug] #0 6a9037b4 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL
[16:38:42] [debug] #1 6a8fd280 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL
[16:38:42] [debug] #2 6a8fda4f in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL
[16:38:42] [debug] #3 6a8fc888 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL
[16:38:42] [debug] #4 6a8f634d in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL
[16:38:42] [debug] #5 6a9d813b in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.D LL
[16:38:42] [debug] #6 6a9d0091 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.D LL
[16:38:42] [debug] #7 6a9d610a in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.D LL
[16:38:42] [debug] #8 6a8fca7b in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL
[16:38:42] [debug] #9 6a8f6664 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL
[16:38:42] [debug] #10 0046e194 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe
[16:38:42] [debug] #11 65646f6d in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe
[16:38:42] [debug] #12 75702f73 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe
[16:38:42] [debug] #13 63696c62 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe
[16:38:42] [debug] #14 786d612e in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe

Reply

where I should to put the files ?
and how/where turn it on ?

I didn't understand
Reply

Quote:
Originally Posted by Gennum.
Посмотреть сообщение
where I should to put the files ?
and how/where turn it on ?

I didn't understand
  1. Compile your script in debug mode (search for this if you don't know how)
  2. Open your server.cfg
  3. Add profiler to the "plugins" line (or create it if it doesn't exist)
  4. Add a new line containing this: "profile_gamemode 1"
  5. Launch the server
  6. If you did everything right, the server will say "Attached profiler to your_gamemode.amx"
  7. Wait for some time (I can't say for how long, depends on your script and your intentions)
  8. Close the server
  9. Go to the "gamemodes" folder and find a file named "your_gamemode-profile.html"
  10. If it doesn't exist, look up server_log.txt, there could be some error (usually due to insufficient file permissions), go back to step #5
  11. Otherwise, open the file in a browser of your choice
  12. For convenience, you can sort by any of the table columns by clicking on it (achieved with jQuery TableSorter plugin, it won't work without an internet connection)
In case you want to profile a filterscript (or several filterscripts), use the "profile_filterscripts" option in step #4. You can also change other things like output format. See the first post for details, or better yet, see the README file on GitHub - it's more up-to-date.
Reply

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
  1. Compile your script in debug mode (search for this if you don't know how)
What's debug mode ? not a regular compile with F5/6 ?
Reply

Can someone tell me how to fix this?

I don't have root acess at my VPS, so I will forward to this to my host so they can fix it. I asked them but it didn't work, so lemme ask here.

[00:04:01] Server Plugins
[00:04:01] --------------
[00:04:01] Loading plugin: profiler.so
[00:04:02] Failed (/usr/lib/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by plugins/profiler.so))
Reply

Hey, at first i wanna thank you for this brilliant plugin. It would be really useful, but unfortunately there is some kind of memory leak. After running the server a couple of hours the SAMP process eats up my entire RAM and the CPU usage is at 100%. The Server log is then filled up with these messages:
Код:
[profiler] Error: std::bad_alloc
[profiler] Error: std::bad_alloc
[profiler] Error: std::bad_alloc
[profiler] Error: std::bad_alloc
Im running it on a 32 bit Ubuntu 12.04.1 machine.
Код:
➜  gamemodes git:(master) ✗ uname -a
Linux n096h064 3.2.0-53-generic-pae #81-Ubuntu SMP Thu Aug 22 21:23:47 UTC 2013 i686 i686 i386 GNU/Linux
Here's my server config:
Код:
echo Executing Server Config...
lanmode 1
rcon_password ***
maxplayers 123
port 7779
hostname Chill RP Development
gamemode0 crp2 1
filterscripts anim gl_chatbubble sanims anticbug newsreporter
plugins sscanf.so mysql_static.so streamer.so MapAndreas.so socket.so fixes2.so profiler.so
announce 1
query 1
weburl www.chillrp.de
maxnpc 30
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 500.0
stream_rate 1000
timestamp 1
pagesize 15
audiomsgoff 1

profile_gamemode 1
call_graph 1
Reply

Код:
[01:26:26] [profiler] Error loading debug info: Invalid/unsupported P-code file format
[01:26:26] [profiler] Attached profiler to 'gamemodes\Beta.amx' (no debug info)
Код:
profile_gamemode 1
profile_format html
Pawn.cfg :

"-d3 -O1 -r"

I also tried "-d3"



When I delete the line "profile_forat html" I have a xml file but when I open it with explorer, there's only written "Float Float Float... Float" and so on.

When I open it with notepad, it gives me something "hard" to understand.

Any ideas ?

Thank you
Reply

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
I've recompiled the Linux binary, download again.
Thank you, it works perfectly!
Reply

Quote:
Originally Posted by RaZVaN ^ xD
Посмотреть сообщение
Thank you, it works perfectly!
Where did you download it from?
Reply

Quote:
Originally Posted by Gryphus One
Посмотреть сообщение
Where did you download it from?
Github Releases
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)