[Plugin] Performance profiler

Cool,pretty useful!
Reply

Anyone by chance have the compiled plugins vs just the code on the links?
Reply

Quote:
Originally Posted by fannet
Посмотреть сообщение
Where I can find function like this:

As you can see I have a big problem with this
Compile with debug symbols (-d3)
Reply

You are best!
Reply

Quote:
Originally Posted by i64
Посмотреть сообщение
When I turned I saw this plugin message:

Код:
Failed (/usr/lib32/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by plugins/profiler.so))
I have Debian 6

Could someone compile?
got the same error, any solutions?
Reply

Failed (/usr/lib/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by plugins/profiler.so)

I have also it. Solution?
Reply

I am not able to create a windows plugin because I got a linux only.
Reply

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.
Reply

It gives the same error on my win 7 aswell :P
Reply

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?
Reply

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!
Reply

Profiler 2.9 is released!

What's new?
  • Runs on ancient Linux boxes
Reply

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.
Reply

Did you add -m32 to compile flags? Like:

Code:
cmake -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 ...
Reply

Nice! It works now. Thanks a lot!
Reply

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 ?
Reply

Fixed: https://github.com/Zeex/samp-plugin-...10.1-win32.zip
Reply

Can someone explain to me how to compile this plugin on a CentOS 6 64-bit server?
Reply

I could still use some assistance with this:

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Can someone explain to me how to compile this plugin on a CentOS 6 64-bit server?
Reply

Latest versions should work OK on CentOS as I removed the code that needed newer libstdc++ and compiled it on a pretty old system, but if it still doesn't load for you here you go:
  1. Install CMake: http://cmake.org/
  2. Go to the plugin source tree:

    Код:
    cd path/to/profiler
  3. Run CMake from there:
    Код:
    cmake -DCMAKE_BUILD_TYPE=Release .
  4. CMake should create a Makefile in the same directory. Now run make to build the plugin.
Once you sucessfully build it the .so file will appear in the "plugin" subdirectory.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)