Author Topic: 0.4.1.2e  (Read 15262 times)

0 Members and 1 Guest are viewing this topic.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: 0.4.1.2e
« Reply #25 on: 24 February, 2011, 18:18:01 »
By the way, ain't UserConnected only called when an unregistered user enters?
Of course it is ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PtokaX forum

Re: 0.4.1.2e
« Reply #25 on: 24 February, 2011, 18:18:01 »

Offline mariner

  • Member
  • ***
  • Posts: 25
  • Karma: +2/-5
    • [K.lan]Project (now tested)
Re: 0.4.1.2e
« Reply #26 on: 28 February, 2011, 07:58:30 »
Hm. I tests PtokaX on different arches. And everywere have equel result. Sources from your tarball and with my modifications works correctly. So, I think, you right. Your code work correctly, if we don't use optimizations flags(I don't understand one thing. Why is reducing cpu usage bad?). Sorry PPK.
Eat my bolts, bastard... ? member of Devaster Squad

sudo ./configure_brain.sh

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: 0.4.1.2e
« Reply #27 on: 01 March, 2011, 23:11:59 »
Optimizations can cause many bugs (for example look to kernel changelog how many fixes for gcc bugs they have), and posix PtokaX have enough bugs without that (high memory usage, buggy timers, incompatibility with udp-debugger when running on big-endian...)  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: 0.4.1.2e
« Reply #28 on: 04 February, 2012, 20:34:29 »
As i wrote, with IPv6 support was strict-aliasing issue partially fixed. SVN rev 72 is fixing rest :P

Compile @ debian wheezy with O3 (O2 have same result)
Quote
root@wheezy:/home/petr/PtokaX# make
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ClientTagManager.cpp -o /home/petr/PtokaX/obj/ClientTagManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/colUsers.cpp -o /home/petr/PtokaX/obj/colUsers.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/DcCommands.cpp -o /home/petr/PtokaX/obj/DcCommands.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/DeFlood.cpp -o /home/petr/PtokaX/obj/DeFlood.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/eventqueue.cpp -o /home/petr/PtokaX/obj/eventqueue.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/globalQueue.cpp -o /home/petr/PtokaX/obj/globalQueue.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/hashBanManager.cpp -o /home/petr/PtokaX/obj/hashBanManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/hashUsrManager.cpp -o /home/petr/PtokaX/obj/hashUsrManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/hashRegManager.cpp -o /home/petr/PtokaX/obj/hashRegManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/HubCommands.cpp -o /home/petr/PtokaX/obj/HubCommands.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/IP2Country.cpp -o /home/petr/PtokaX/obj/IP2Country.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LanguageManager.cpp -o /home/petr/PtokaX/obj/LanguageManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaBanManLib.cpp -o /home/petr/PtokaX/obj/LuaBanManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaCoreLib.cpp -o /home/petr/PtokaX/obj/LuaCoreLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaIP2CountryLib.cpp -o /home/petr/PtokaX/obj/LuaIP2CountryLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaProfManLib.cpp -o /home/petr/PtokaX/obj/LuaProfManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaRegManLib.cpp -o /home/petr/PtokaX/obj/LuaRegManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaScript.cpp -o /home/petr/PtokaX/obj/LuaScript.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaScriptManager.cpp -o /home/petr/PtokaX/obj/LuaScriptManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaScriptManLib.cpp -o /home/petr/PtokaX/obj/LuaScriptManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaSetManLib.cpp -o /home/petr/PtokaX/obj/LuaSetManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaTmrManLib.cpp -o /home/petr/PtokaX/obj/LuaTmrManLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/LuaUDPDbgLib.cpp -o /home/petr/PtokaX/obj/LuaUDPDbgLib.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ProfileManager.cpp -o /home/petr/PtokaX/obj/ProfileManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/PtokaX-nix.cpp -o /home/petr/PtokaX/obj/PtokaX.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/pxstring.cpp -o /home/petr/PtokaX/obj/pxstring.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/RegThread.cpp -o /home/petr/PtokaX/obj/RegThread.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ResNickManager.cpp -o /home/petr/PtokaX/obj/ResNickManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ServerManager.cpp -o /home/petr/PtokaX/obj/ServerManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ServerThread.cpp -o /home/petr/PtokaX/obj/ServerThread.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/serviceLoop.cpp -o /home/petr/PtokaX/obj/serviceLoop.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/SettingManager.cpp -o /home/petr/PtokaX/obj/SettingManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/TextFileManager.cpp -o /home/petr/PtokaX/obj/TextFileManager.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/UdpDebug.cpp -o /home/petr/PtokaX/obj/UdpDebug.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/UDPThread.cpp -o /home/petr/PtokaX/obj/UDPThread.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/User.cpp -o /home/petr/PtokaX/obj/User.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/utility.cpp -o /home/petr/PtokaX/obj/utility.o
g++ -O3 -g -Wall -Wextra -Itinyxml -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 -c /home/petr/PtokaX/core/ZlibUtility.cpp -o /home/petr/PtokaX/obj/ZlibUtility.o
g++ \
        /home/petr/PtokaX/obj/ClientTagManager.o /home/petr/PtokaX/obj/colUsers.o /home/petr/PtokaX/obj/DcCommands.o /home/petr/PtokaX/obj/DeFlood.o /home/petr/PtokaX/obj/eventqueue.o /home/petr/PtokaX/obj/globalQueue.o /home/petr/PtokaX/obj/hashBanManager.o /home/petr/PtokaX/obj/hashUsrManager.o \
        /home/petr/PtokaX/obj/hashRegManager.o /home/petr/PtokaX/obj/HubCommands.o /home/petr/PtokaX/obj/IP2Country.o /home/petr/PtokaX/obj/LanguageManager.o /home/petr/PtokaX/obj/LuaBanManLib.o /home/petr/PtokaX/obj/LuaCoreLib.o /home/petr/PtokaX/obj/LuaIP2CountryLib.o \
        /home/petr/PtokaX/obj/LuaProfManLib.o /home/petr/PtokaX/obj/LuaRegManLib.o /home/petr/PtokaX/obj/LuaScript.o /home/petr/PtokaX/obj/LuaScriptManager.o /home/petr/PtokaX/obj/LuaScriptManLib.o /home/petr/PtokaX/obj/LuaSetManLib.o /home/petr/PtokaX/obj/LuaTmrManLib.o \
        /home/petr/PtokaX/obj/LuaUDPDbgLib.o /home/petr/PtokaX/obj/ProfileManager.o /home/petr/PtokaX/obj/PtokaX.o /home/petr/PtokaX/obj/pxstring.o /home/petr/PtokaX/obj/RegThread.o /home/petr/PtokaX/obj/ResNickManager.o /home/petr/PtokaX/obj/ServerManager.o /home/petr/PtokaX/obj/ServerThread.o \
        /home/petr/PtokaX/obj/serviceLoop.o /home/petr/PtokaX/obj/SettingManager.o /home/petr/PtokaX/obj/TextFileManager.o /home/petr/PtokaX/obj/UdpDebug.o /home/petr/PtokaX/obj/UDPThread.o /home/petr/PtokaX/obj/User.o /home/petr/PtokaX/obj/utility.o /home/petr/PtokaX/obj/ZlibUtility.o \
        /home/petr/PtokaX/tinyxml/tinyxml.a -o PtokaX -lpthread -llua5.1 -lrt -lz
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: 0.4.1.2e
« Reply #29 on: 05 February, 2012, 15:21:34 »
And as expected, zero difference in cpu usage  :-X
Version without optimizations:
Quote
Version: PtokaX DC Hub 0.4.2.0 [build 314] built on Oct 31 2011 00:10:37
OS: Linux 2.6.32.28 (x86_64)
Users (Max/Actual Peak (Max Peak)/Logged): 666 / 495 (649) / 482
CPU usage (60 sec avg): 0.25%
Version with O3 optimizations:
Quote
Version: PtokaX DC Hub 0.4.2.0 [build 320] built on Feb  4 2012 20:01:49
OS: Linux 2.6.32.28 (x86_64)
Users (Max/Actual Peak (Max Peak)/Logged): 666 / 511 (649) / 486
CPU usage (60 sec avg): 0.26%

Compiler optimizations simply can't do miracles with code that was hand optimized by developer :P
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PtokaX forum

Re: 0.4.1.2e
« Reply #29 on: 05 February, 2012, 15:21:34 »