SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 31/03/2013, 03:39 PM   #161
Tamer
High-roller
 
Tamer's Avatar
 
Join Date: Nov 2011
Location: Turkey
Posts: 1,099
Reputation: 172
Default Re: Performance profiler

I am not able to create a windows plugin because I got a linux only.
__________________
The three stages of truth:

- Ridicule.
- Violent opposition.
- Acceptance.


Quote:
The greatest hypnotist on the planet Earth is an oblong box in the corner of the room. It is constantly telling us what to believe is real. If you can persuade people that what they see with their eyes is what there is to see you've got them. you know because they'll laugh in your face of an explanation that portrays the biggest picture of what's happening... and they have.
Tamer is offline   Reply With Quote
Old 31/03/2013, 03:51 PM   #162
SKAzini
Huge Clucker
 
SKAzini's Avatar
 
Join Date: Jun 2012
Posts: 376
Reputation: 17
Default Re: Performance profiler

Quote:
Originally Posted by Tamer T View Post
I am not able to create a windows plugin because I got a linux only.
Is the computer you're typing from now Linux based? If it's a Windows computer, just download the Windows server from here and put it on your desktop, copy all Windows plugins and the .amx file and then check what uses the most resources with the profiler plugin.

Last edited by SKAzini; 31/03/2013 at 05:11 PM.
SKAzini is offline   Reply With Quote
Old 31/03/2013, 05:45 PM   #163
Tamer
High-roller
 
Tamer's Avatar
 
Join Date: Nov 2011
Location: Turkey
Posts: 1,099
Reputation: 172
Default Re: Performance profiler

It gives the same error on my win 7 aswell :P
__________________
The three stages of truth:

- Ridicule.
- Violent opposition.
- Acceptance.


Quote:
The greatest hypnotist on the planet Earth is an oblong box in the corner of the room. It is constantly telling us what to believe is real. If you can persuade people that what they see with their eyes is what there is to see you've got them. you know because they'll laugh in your face of an explanation that portrays the biggest picture of what's happening... and they have.
Tamer is offline   Reply With Quote
Old 02/04/2013, 11:52 AM   #164
Slice
High-roller
 
Join Date: Mar 2008
Posts: 1,831
Reputation: 1607
Default Re: Performance profiler

I really don't want to install a bunch of unstable packages on my Debian 6 dedi - is there no way to compile this with GCC 4.4.5?
Slice is offline   Reply With Quote
Old 02/04/2013, 07:06 PM   #165
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 320
Reputation: 382
Default Re: Performance profiler

OK, I've removed all the C++11 stuff, but now it depends on Boost (at least 1.49).

Edit:

Good news: Boost isn't needed anymore!

Last edited by xeeZ; 03/04/2013 at 10:25 AM.
xeeZ is offline   Reply With Quote
Old 03/04/2013, 10:52 AM   #166
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 320
Reputation: 382
Default Re: Performance profiler

Profiler 2.9 is released!

What's new?
  • Runs on ancient Linux boxes
xeeZ is offline   Reply With Quote
Old 03/04/2013, 01:18 PM   #167
Slice
High-roller
 
Join Date: Mar 2008
Posts: 1,831
Reputation: 1607
Default Re: Performance profiler

Nice! I've almost gotten it to work. It goes to 100% then this:

Code:
Linking CXX shared module profiler.so
/usr/bin/ld: ../amx_profiler/libamx_profiler.a(call_graph_writer.cpp.o): relocation R_X86_64_32S against `vtable for amx_profiler::CallGraphWriter' can not be used when making a shared object; recompile with -fPIC
../amx_profiler/libamx_profiler.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [plugin/profiler.so] Error 1
make[1]: *** [plugin/CMakeFiles/plugin.dir/all] Error 2
make: *** [all] Error 2
I put -fPIC in CMakeList.txt and it caused loads of errors:

Code:
Linking CXX shared module profiler.so
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_graph_writer.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_graph_writer_dot.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(debug_info.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(profiler.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(public_function.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer_html.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer_text.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer_xml.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(time_utils.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(amx_utils.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_graph.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_stack.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(function.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(function_call.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(function_statistics.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(native_function.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(normal_function.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(performance_counter.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(clock-posix.cpp.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `subhook/libsubhook.a(subhook.c.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx/libamx.a(amxaux.c.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `../amx/libamx.a(amxdbg.c.o)' is incompatible with i386 output
../amx_profiler/libamx_profiler.a(debug_info.cpp.o): In function `amx_profiler::DebugInfo::DebugInfo(tagAMX_DBG const*)':
debug_info.cpp:(.text+0x42): undefined reference to `operator new(unsigned long)'
../amx_profiler/libamx_profiler.a(debug_info.cpp.o): In function `amx_profiler::DebugInfo::DebugInfo(tagAMX_DBG const*)':
debug_info.cpp:(.text+0x84): undefined reference to `operator new(unsigned long)'
../amx_profiler/libamx_profiler.a(debug_info.cpp.o): In function `amx_profiler::DebugInfo::Load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
debug_info.cpp:(.text+0x14c): undefined reference to `operator new(unsigned long)'
../amx_profiler/libamx_profiler.a(profiler.cpp.o): In function `amx_profiler::Profiler::DebugHook(int (*)(tagAMX*))':
profiler.cpp:(.text+0x552): undefined reference to `operator new(unsigned long)'
../amx_profiler/libamx_profiler.a(profiler.cpp.o): In function `amx_profiler::Profiler::CallbackHook(int, int*, int*, int (*)(tagAMX*, int, int*, int*))':
profiler.cpp:(.text+0x71b): undefined reference to `operator new(unsigned long)'
../amx_profiler/libamx_profiler.a(profiler.cpp.o):profiler.cpp:(.text+0x8c5): more undefined references to `operator new(unsigned long)' follow
collect2: ld returned 1 exit status
make[2]: *** [plugin/profiler.so] Error 1
make[1]: *** [plugin/CMakeFiles/plugin.dir/all] Error 2
make: *** [all] Error 2

I probably did something wrong, but I have no clue where/what to look for.
Slice is offline   Reply With Quote
Old 03/04/2013, 01:22 PM   #168
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 320
Reputation: 382
Default Re: Performance profiler

Did you add -m32 to compile flags? Like:

Code:
cmake -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 ...
xeeZ is offline   Reply With Quote
Old 03/04/2013, 01:27 PM   #169
Slice
High-roller
 
Join Date: Mar 2008
Posts: 1,831
Reputation: 1607
Default Re: Performance profiler

Nice! It works now. Thanks a lot!
Slice is offline   Reply With Quote
Old 12/04/2013, 06:42 PM   #170
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,801
Reputation: 375
Default Re: Performance profiler

I wanted to use profiler for few things (I used it sometime ago and worked fine), but when I load the plugin it crashes. If I have "profile_gamemode" at 0 it doesn't. "profile_gamemode" is the only thing I have in server.cfg from profiler. It's crashing after the filterscripts are loaded (and GM is starting to load).

EDIT: 2.8 is not working too, where I can find older versions ?
__________________


IstuntmanI is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timers performance Zamaroht Scripting Help 5 30/08/2012 09:29 AM
Bad performance on a great PC Juan Dover Client Support 20 13/02/2011 07:34 PM
Performance issues gamer931215 Everything and Nothing 3 26/08/2010 09:54 PM
SQL performance Dabombber Help Archive 7 24/09/2009 03:49 PM
9400 GT - GTA:SA Performance rafay Everything and Nothing 14 09/06/2009 04:23 PM


All times are GMT. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.