1
0
forked from 0ad/0ad
Commit Graph

53 Commits

Author SHA1 Message Date
ffc4a56b9f Revert non-ASCII characters from source and configuration files introduced in 157c6af18e.
Fixes #6846

Differential Revision: https://code.wildfiregames.com/D5185
This was SVN commit r27965.
2023-12-03 00:30:12 +00:00
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
b31e698f12 Use override in classes derived from AbstractProfileTable.
Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4825
This was SVN commit r27414.
2023-01-10 22:32:08 +00:00
2355240eec Removes the Profiler allocation counter. Fixes #6476
Refs 5c8250ddb8, 5664f097d9, 6b0a0e83eb.

Patch By: smiley
Differential Revision: https://code.wildfiregames.com/D4606
This was SVN commit r26805.
2022-04-18 21:37:08 +00:00
5ee8354e99 Fix windows SEH hook when crashing in an std::thread
Follows 107d3d461f and other 'pthread->std::thread' diffs.

Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
2021-01-10 08:39:54 +00:00
9ece3e7088 Pthread -> std::thread (2/7) - Remove pthread in Profilers
Use std::thread and thread_local instead of pthread specific calls.

Differential Revision: https://code.wildfiregames.com/D1916
This was SVN commit r22608.
2019-08-04 08:11:58 +00:00
ba736916fc Clean up ThreadUtil, use standard C++11 constructs instead of custom ones.
ThreadUtil shipped a scope lock and a mutex implementation, which can be
removed since we now have these in the standard library.
This lets us clean up this header which get included everywhere (through
profiler includes).

Tested By: Angen and Stan
Differential Revision: https://code.wildfiregames.com/D1915
This was SVN commit r22344.
2019-06-06 19:30:48 +00:00
417c84870c Actually remove trailing tabs from source/.
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
6149dd3841 Actually remove trailing whitespace for non-header files as well.
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
0d9a7dab6b Works around infinite recursion problem.
This problems occurs with the new SpiderMonkey in debug mode, but it's
not a SpiderMonkey issue.
Unfortunately I couldn't find a clean solution, so I just documented the
problem in an extensive comment block and applied a workaround.
A clean solution would probably require changing the approach for
counting allocations completely.

This was SVN commit r14874.
2014-03-28 11:33:37 +00:00
6b0a0e83eb Fix profiler malloc count in debug mode on Windows
wdbg_heap_NumberOfAllocations doesn't work without the wdbg_heap
leak detector, which is disabled since it's slow and broken.
Use a simple hook via _CrtSetAllocHook instead to count allocations.

This was SVN commit r13910.
2013-09-29 14:43:14 +00:00
56bd4b37cd Fix #1064 more
This was SVN commit r10860.
2012-01-03 15:42:03 +00:00
c4bb67a1ca Fix #1064 (use ++it instead of it++ for consistency), based on patch by Echelon9
This was SVN commit r10822.
2011-12-29 01:17:03 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
6d25329412 # towards locale-independent pathnames on Linux
c.f.
http://www.wildfiregames.com/forum/index.php?showtopic=14541&st=0&p=217250&#entry217250
and 2011-03-19 meeting

This was SVN commit r9090.
2011-03-21 17:53:13 +00:00
51b58328f7 Fix negative 'unlogged' time in profiler at start of game.
Remove redundant Reset call.

This was SVN commit r9047.
2011-03-08 16:58:07 +00:00
7d6cfe58de Fix non-PCH build
This was SVN commit r9037.
2011-03-06 00:01:23 +00:00
1c1564daaf Make profiler JSON output much more concise.
Right-align values in in-game profile viewer.
Add alternating row shading in profile viewer, to make it easier to
read.

This was SVN commit r9004.
2011-03-03 01:09:19 +00:00
ee8b193cdb Fix profiler crash differently
This was SVN commit r8967.
2011-02-21 11:57:01 +00:00
a155809447 avoid crash due to null pointer in profiler (triggered by returning from the root node)
This was SVN commit r8966.
2011-02-21 09:41:11 +00:00
d75d9c3b75 Make the script profiler more useful, by giving the filename/line for anonymous functions.
Fix the turn-based profiler a bit.

This was SVN commit r8964.
2011-02-21 02:16:12 +00:00
d7a243343d Add per-turn counts to profiler, as well as per-frame.
Remove percent-of-parent and percent-of-frame timings since they're not
particularly useful.
Simplify profiler update code by using RingBuf.
Handle profiler keys via character codes rather than keysyms, to
hopefully work with different keyboard layouts.
Make console intercept all keys, to stop digits, shift-D, etc having
unexpected side-effects.
Disable console copy/paste when console is inactive.

This was SVN commit r8960.
2011-02-20 20:50:26 +00:00
b292a32505 Add JS memory usage to profiler.
Add dumpHeaps() console function for debugging JS memory usage.
Increase default JS heap size.
Make call-time profile table appear first when toggling.
Remove some unused script functions.

This was SVN commit r7842.
2010-08-02 19:23:58 +00:00
fe53bce3b1 Rewrite the clone-object-between-JS-contexts code (for GUI<->simulation interface) to be more efficient.
Delete unnecessary unused incomplete profiler scripting support.
Clean up some JSAPI code to use newer features.
Display simulation script functions in the profiler.

This was SVN commit r7503.
2010-05-05 22:36:35 +00:00
cfae58928f # New unit movement system, which does a far better job of approaching targets and avoiding obstacles.
Add short-range vertex-based pathfinder.
Integrate new pathfinder into unit motion code.
Change obstruction system to get rid of circles, and differentiate
structures from units.
Make PositionChanged messages synchronous.
Try to prevent some accidental float->int conversions.

This was SVN commit r7484.
2010-04-29 23:36:05 +00:00
3e7c87c7b0 # Improved memory profiling on Linux
Try yet again to make the malloc overrides less unreliable, and simplify
a bit

This was SVN commit r7278.
2010-01-22 11:22:26 +00:00
58e9176ef0 Fix malloc overrides to work better with a certain combination of glibc and libopenal
This was SVN commit r7274.
2010-01-13 23:15:47 +00:00
797c9e1644 Use a more thread-safe way of counting glibc memory allocations in the profiler
This was SVN commit r7257.
2010-01-07 19:20:40 +00:00
9662666403 more string drudgery
- sprintf, snprintf -> sprintf_s (ensures 0-termination of result)
- use %s instead of %hs with sprintf_s to avoid GCC warnings
- convert h_mgr's to_string to unicode

This was SVN commit r7170.
2009-11-06 10:59:10 +00:00
77d2c67ada misc. string fixes
convert remaining %s to %hs or %ls
use WPRINTF_ARGS on unicode printf functions
fix: __func__ can't be widened via preprocessor (-> revert to char*)
convert remaining external_[directory|file_string to string()
Util: don't mix fwprintf and fprintf
Formation: fix dangling pointer (storing result of c_str())

This was SVN commit r7164.
2009-11-04 15:29:28 +00:00
1743645fd3 Simplify the overly-complex CppDoc-breaking file headers
This was SVN commit r6832.
2009-04-18 17:51:05 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
a3696c0b91 premake: detect processor architecture from script
lib/sysdep: clean up by moving OS and cpu-arch folders into "os" and
"arch" folders

This was SVN commit r6162.
2008-06-30 17:34:18 +00:00
e76a15d19d Fixed unused argument warning.
Trying post-commit hook again: fixed #194.

This was SVN commit r5885.
2008-04-15 13:49:08 +00:00
74b4ac19c1 cleanup+fixes; wdbg_heap is now feature complete.
should be safe to distribute this build

code_annotation.h: add our own noncopyable to avoid DLL base class
warning
debug: remove some unicode functions (unnecessary); minor cleanup
debug_stl: disabled
mahaf: do not warn when running as non admin
wdbg: add wdbg_printf and wdbg_assert for use in allocation hook. add
header
wdbg_heap: now feature complete.
. allows storing 3..4 frames from the call stack with 0 space overhead.
. prevents garbage file/line output.
. takes care of allocation counting (previously done by profiler)
wdbg_sym.cpp: cleanup+fixes (locking, wdbg_*)

fix: properly specify __declspec(dllimport) for certain classes

This was SVN commit r5679.
2008-02-25 21:19:52 +00:00
aebf8cbf68 fix VFS bug preventing directories from being created:
- vfs_lookup: currentPath was of wrong type; simplified and fix create
logic
- archive_zip: fix: correctly handle filenames with /
- vfs: remove workaround for above bug
- io: temporarily disable block caching (works around problem with zip
file created by 7z)

add and use new wdbg_heap module (WIP)
remove mmgr

This was SVN commit r5571.
2008-01-20 16:53:09 +00:00
c85957662a Changed Windows memory-allocation counter to get more predictable performance. Removed slow debug_printf warning about low FPS, to avoid positive feedback.
This was SVN commit r5546.
2008-01-12 21:08:11 +00:00
a859562ea7 improvements and fixes:
- properly differentiate between buffer/offset alignment and length
alignment (relevant since block size has been increased to 256k)
- use VfsPath for most game paths instead of CStr
- clean up timer interface and implementation
- self-tests no longer crash
- file_cache.cpp: fix for the case where allocation fails (prevent
deleter from seeing a null pointer)
- allocators: move all shared_ptr-related stuff to its own component;
add DummySharedPtr
- codec: disable checksums (important for performance at work)
- File: made into an interface class to avoid export problems. not
entirely sure about this..
- vfs_path.h, path.h, os_path.h: proper fix for using
fs::change_extension and similar utility functions with derivatives of
basic_path
- lib_api: automatically link against import lib if building lib/ as a
DLL
- path_util: remove unused functions (this component is deprecated)
- compiler.h: add INLINE
- Xeromyces.cpp: pass PIVFS so that GetXMBPath works in self-test
(should do this mostly everywhere rather than have one singleton g_VFS)

This was SVN commit r5537.
2008-01-07 20:03:19 +00:00
Seth
91a1d0fc3f Replaced line 15 with #if defined(__GLIBC__) && !defined(NDEBUG) to fix problems regarding malloc hook on mac os x
This was SVN commit r5211.
2007-06-23 17:14:00 +00:00
dc40e831d4 profile: bugfix (cpu.h atomic functions require intptr_t)
slight improvements to aken (declare code segment as pageable)

This was SVN commit r5202.
2007-06-17 10:29:28 +00:00
5664f097d9 Profiler: Added malloc-counting to GCC. Fixed counting of unlogged allocations in the root node.
GUI: Tried a tiny bit to improve the response to mouse movement.
Atlas: Realised you can do "new XML(...)" to parse XML.

This was SVN commit r5180.
2007-06-15 17:03:26 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
fa45d214b3 # Added support for COLLADA skeletal animations.
Moved COLLADA-loading code into separate class, since it now handles
both PMD and PSA.
Desingletonised CSkeletonAnimManager, moved into CGameView.
Made Atlas load its icons with buffered IO, for possible efficiency.

This was SVN commit r4934.
2007-03-01 18:52:53 +00:00
c2b119e721 # Linux fixes.
Disabled CONFIG_USE_MMGR by default, since it seems unnecessary and it
makes debug builds slow (extremely slow under Valgrind) due to symbol
lookups when allocating memory.
Fixed minor warnings and errors.

This was SVN commit r4927.
2007-02-25 21:11:57 +00:00
5c8250ddb8 # Added primitive memory-allocation counting
Profiler: now shows "mem allocs" for the previous frame (only in MSVC
Debug mode).
Aura: got rid of a couple of hundred allocations per frame.

This was SVN commit r4805.
2007-01-21 03:33:52 +00:00
2fac02f40a # Actor Viewer tool: added controls to toggle shadows, ground and polygon counts.
Elsewhere:
Disabled stack-trace test because it gives me assertion failures.
Fixed some uses of snprintf (which doesn't always add a \0 to the end of
the string), then got bored so there are still lots of broken ones.
Probably should replace snprintf with something more like snprintf_s
(but non-fatal) or something.
Made CLogger output valid HTML (except for the potentially dodgy
doctype). Removed its memory-logger, since we never use it and MICROLOG
can be used instead for quick execution-tracing.
Added tests to make sure CLogger handles long strings properly (which it
didn't). Made CLogger not a singleton, so it can be tested sensibly.

This was SVN commit r4424.
2006-09-28 20:41:12 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
6e82e33ccf - display_msg and display_error -> debug prefix since in debug header
- debug_warn_err now takes LibError
- lib_error.cpp: revise error code -> string (only support liberror
now); add function to set errno from LibError
- unifont, CFont: parameter made a simple wchar_t from const wchar_t&
- mmap now sets errno
- Loader and VfsUtil function now return LibError as well
- Profile.cpp, ProfileViewer.cpp: fix int/uint/size_t warnings
- Renderer.cpp: fix cannot-generate-assignment-operator warning

This was SVN commit r3235.
2005-12-12 19:19:30 +00:00
5087732fe3 Refactor ProfileViewer into a singleton that uses AbstractProfileTable as
data model.
Profile.cpp implements AbstractProfileTable so the original
functionality
of the profiling display remains.
CRenderer also contains an AbstractProfileTable implementation that
displays
the rendering stats. Switch through different profile views using F11.

This was SVN commit r3154.
2005-11-19 16:15:34 +00:00
d0f7cb015c - Linux/GCC (as usual :P)
- Ported lockless code to gcc inline assembly
- A few new net messages (gather, attack, add waypoint)
- Support for new messages in network->entity order converter
- Implemented rudimentary JS interface for Interaction
- issueCommand JS API, connected to the network
- Removed Interaction stuff now replaced by JS
- And something in there should probably break VS builds :P

This was SVN commit r2316.
2005-05-18 05:32:09 +00:00