Change | User | Description | Committed |
---|---|---|---|
20958 | ShadauxCat | New memory management startegy for ConcurrentQueue that eliminates the need for traditiona...l reference counting and now uses a decrement-only counter to reliably clean up memory without stomping on any other threads. The removal of the reference counting, and the movement of the buffer capacity check to a member variable on the queue itself, has resulted in a performance increase of roughly 20-25% and eliminated a very rare accounting error. Also cleaned up the comments and removed a commented-out alternative implementation of Dequeue(). #review-20959 post-commit « |
8 years ago |
20951 | ShadauxCat | - Reworked ConcurrentQueue::Dequeue to be a lot faster and wait-free - Added constexpr co...nstructor for sprawl tag - Added support for specifying base for int-to-tag conversion - Added ability to force poolallocator to pass through to malloc - Added a helper class that will eventually be used in StringBuilder for faster int-to-string conversion #review-20952 post-commit « |
8 years ago |
19912 | ShadauxCat |
Fix various linux warnings and errors under clang 3.6 #review-19913 |
9 years ago |
19910 | ShadauxCat | Just disabled the concurrent queue tests altogether since the perf tests are non-determini...stic and the other tests are partially commented out due to misbehavior anyway. Will re-enable them once I figure out what broke them. #review-19911 « |
9 years ago |
19908 | ShadauxCat | Fixed some test issues in vs2015 (behavior of floating point serialization is now consiste...nt with clang/gcc when it previously was not) and commented out a non-deterministic concurrent queue test. #review-19909 « |
9 years ago |
19906 | ShadauxCat | - Added tag, compile time string type - Since tag requires visual studio 2015, removed co...mpatibility code for earlier versions of visual studio - Improved compiler detection - Added endianness detection - Added template if/else helper - Fixed bug with murmur3 64 bit - Added seed argument for murmur3 #review-19907 « |
9 years ago |
17221 | ShadauxCat | Merging using ShadauxCat.csbuild-brandon_m_bare | 9 years ago |
16768 | ShadauxCat | Improvements to error handling in builds with exceptions disabled: - In debug builds or... with SPRAWL_ERRORSTATE_STRICT enabled, ErrorState will output a message to stderr and terminate if Get() is called when an error flag is set. (In release buils or with SPRAWL_ERRORSTATE_PERMISSIVE defined, Get() will return junk memory in this case.) - In debug builds or with SPRAWL_ERRORSTATE_STRICT enabled, ErrorState will output a message to stderr and terminate if its destructor is called without checking the errorstate if an error is present (equivalent to an exception terminating the application if no catch() block is present for it). - On linux builds and when running "Analyze" through visual studio, a warning will be issued if any function returning ErrorState has its return value ignored. (This only applies to builds with exceptions not enabled; when exceptions are enabled no warning is issued) - Many functions that could return ErrorState were having their return values silently ignored in internal sprawl code so the user would not find out about errors if exceptions are disabled; now anything in sprawl code that calls a function returning ErrorState will either handle the error, or (in most cases) surface it back up to the user. - As a positive side-effect of the warnings for ignoring ErrorState, several constructors that were capable of throwing exceptions are no longer capable of doing so. #review-16769 « |
9 years ago |
16380 | ShadauxCat | Missed a header, also corrected missing newline in exceptions.hpp, also corrected exceptio...ns.hpp being exceptions.h. #review-16381 « |
9 years ago |
16378 | ShadauxCat | New exception framework, phase one. Added new class, ErrorState, for handling errors when... exceptions are disabled. When exceptions are enabled, ErrorState<T> is an alias for T. When they're disabled, ErrorState<T> additionally encodes an error code, and will have junk data (and probably a crash) if an error is returned and not checked before the data is used. ErrorState<T> is implicitly convertible to and from T, so applications that don't care about errors can code like they don't exist... Phase two will involve overloading operators on ErrorState so that things that return ErrorState can still function as much as possible like they do when exceptions are enabled. #review-16379 « |
9 years ago |
16283 | ShadauxCat | Changed linux backtrace library to use backtrace() instead of libunwind. backtrace() cost...s about 1 us more per call than libunwind does, but saves a dependency, so that extra 1us seems not to matter much in the face of external dependency requirements. This ensures the only external dependency is libbfd, which is more readily available on more systems than libunwind and also more likely to already be installed. libunwind's major performance benefit over glibc is in symbolification, and we don't use libunwind for symbolification because libbfd gives us more information (i.e., filename and line numbers). So the dependency has very very little real benefit. #review-16284 « |
9 years ago |
16257 | ShadauxCat |
Compile fix #review-16258 |
9 years ago |
16255 | ShadauxCat |
Fixed some issues with the size calculation for OpaqueTypeLiast. #review-16256 |
9 years ago |
16248 | ShadauxCat | Added a compile error for opaque type static asserts that will give better error messages... (including the signature of each type) when the asserts fail. #review-16249 « |
9 years ago |
16246 | ShadauxCat | - Fixed size and type computation for OpaqueTypeList, which was incorrect because it was b...uilding the struct in reverse order - and windows x86 also seems to have strange behavior with inheritance or including structs as class members when it comes to size calculation. So I'm now calculating the size manually. (Yay recursive compile-time math...) - Added function in logging to get the file object corresponding with a PrintToFile handler. #review-16247 « |
9 years ago |
16242 | ShadauxCat | Added OpaqueTypeList, an alias that enables creation of opaque types via a list of member... types. #review-16243 « |
10 years ago |
16231 | ShadauxCat |
Fixed a wording issue in OpaqueType static asserts. #review-16232 |
10 years ago |
16225 | ShadauxCat | - Renamed OpaquePtr to OpaqueType, which is more correct as it isn't a pointer. - Added a...lignment restriction to OpaqueType - Changed Mutex implementation on Windows to use faster SRWLOCK instead of CRITICAL_SECTION (cannot mirror this change on Linux because pthread_cond_wait can't accept a pthread_rwlock_t) #review-16226 « |
10 years ago |
16223 | ShadauxCat | Added opaque pointer. Maybe this should really be called OpaqueData, since it's not reall...y a pointer. #review-16224 « |
10 years ago |
16181 | ShadauxCat |
Fix build errors on linux, OS X #review-16182 |
10 years ago |
16179 | ShadauxCat | - Added SPRAWL_DEBUG macro - Added additional runtime coroutine safety checks against not... only wrong type of coroutine, but wrong send/receive type - Added ability to disable these additional runtime checks (and defaulted them to turned off in release builds) as they entail up to three virtual function calls and possibly an exception (when exceptions are enabled) - Added requirement that a coroutine that can yield a value must call a function that returns a value of the same type - this ensures that after the last value from the function has been received, the function doesn't have to be called again (with potentially unpredictable results...) to put it into the "Completed" state. Now the last value must be transmitted with a full return, so the last value and the "Completed" state come around at the same time. (This involves all sorts of ca-razy assumptions and reinterpret_casting... assumptions protected via static_assert) #review-16180 « |
10 years ago |
16175 | ShadauxCat |
Enabled exceptions on windows release build... #review-16176 |
10 years ago |
16173 | ShadauxCat | Fixed clang compile error (which should have been a windows error, too, bad windows.) #...review-16174 « |
10 years ago |
16171 | ShadauxCat | - Created type traits header including macros to make checks for types having any operator... or member function, and seeded it with every operator operating on the same type. For function and/or type combinations not already handled, creating a new type traits struct is just a single line of code. - Updated coroutine to use the new type traits header and removed the explicit operator() check - Added alternative to SPRAWL_THROW_EXCEPTION - SPRAWL_THROW_EXCEPTION_OR_ABORT, which as it sounds, will either throw the exception if exceptions are enabled, otherwise will print the message and abort. This is for cases where returning a value reliably isn't possible, such as in constructors or code that returns a template type that may not be default constructible. - Added a layer of safety around coroutines; trying to call the various functions that pause the current coroutine will now throw an exception (if enabled) or abort (if not) if you try to call the wrong pause function (i.e., calling an empty yield() on a coroutine that's supposed to return a value) - Added ability to determine what type a CoroutineBase object actually is underneath - Added function in logging to flush one specific category instead of flushing everything #review-16172 « |
10 years ago |
16158 | ShadauxCat | - Made an event unit test a bit more explicit - Corrected the fact that that test was not... accounted for in the WaitAny and WaitAll suites #review-16159 « |
10 years ago |
16156 | ShadauxCat | Fixed a unit test failure on Windows due to not waiting long enough for the thread to thro...w an exception in the exception propagation test. #review-16157 « |
10 years ago |
16153 | ShadauxCat | - Changed compile-time-bound strings to be sprawl::StringLiteral instead of sprawl::String.... (Was going to do raw char*, but StringLiteral allows the length of the string to be baked in at compile time and thus avoids costly strlen() operations.) - Split Event::WaitMultiple() into Event::WaitAny() and Event::WaitAll() - Added Event::NotifyAll() - Added variadic template functions to make WaitAny(), WaitAll(), and NotifyAll() easier to work with when the list of events is known at compile time (i.e., Event::WaitAny(event1, event2, event3); to wait for all thre events instead of having to construct the EventGroup manually - also ensures EventGroup construction eficiency by constructing it with the proper capacity for the number of events being waited on) #review-16154 « |
10 years ago |
16135 | ShadauxCat | - Changed the way category handlers are registered a bit so that a category can't get the... same handler added to it twice (i.e., from having both a parent and a grandparent with the same handler, which would happen if, for example, "Test" were registered with a handler, then "Test::Test2" were set to inherite handlers from "Test", and then "Test::Test2::Test3" were set to inherit from "Test::Test2") - Changed levelStr parameter to log function to be a char* so there's one less string to construct - Moved runtime level checking up higher so that arguments wouldn't be called/constructed if the log level is runtime-disabled - Added unit tests to verify the above #review-16136 « |
10 years ago |
16133 | ShadauxCat |
Fixed missing header in thread_linux.hpp #review-16134 |
10 years ago |
16131 | ShadauxCat | - Exposed FILE* object in sprawl::filesystem::File - Added ability to specify flush behav...ior for custom handlers via std::function (interesting note - apparently with optimization enabled, calls to std::function can execute faster than virtual function calls) - Threads that destruct with no Join() after exiting with an uncaught exception will terminate with an error message rather than swallowing the exception and letting it disappear #review-16132 « |
10 years ago |
16111 | ShadauxCat | - Threads can now optionally catch exceptions to be rethrown on another thread when it cal...ls Join(). The exception state of a thread can also be queried via HasException() - if this returns true, the thread exited due to an uncaught exception that will be rethrown on Join(). - The behavior of the thread destructor can now be manipulated via SetDestructionBehavior(). By default, a thread whose destructor is called without Join() being called on it will call std::terminate(). But that behavior can be changed such that the destructor can either call Join() automatically, or detach the thread, if it destructs without Join() being called. (If it calls Join() on a thread that caught an exception, the exception will NOT be rethrown, it will be lost to the aether. Throwing exceptions in a destructor is bad, but I'm on the fence whether this should just throw those exceptions away or call std::terminate() in that case. Open for input.) #review-16112 « |
10 years ago |
16110 | ShadauxCat | Disabling json performance tests because they're non-deterministi and causing CI failures. | 10 years ago |
16107 | ShadauxCat | - Added GetCurrentCoroutine() and GetCallingCoroutine() functions to obtain reference to t...he currently executing coroutine object and to the coroutine that was previously executing when this one began (i.e., the one that called Resume() / operator() on it) - Coroutines now surface exceptions - if a coroutine throws an exception that is unhandled, the exception will be caught and rethrown after the previous coroutine (or potentially 'main routine') resumes, allowing it to be caught and handled there. #review-16108 « |
10 years ago |
16088 | ShadauxCat | Coroutine improvements: - Yield-only coroutine (aka "generator") can now be iterated usin...g range-based for. (Other coroutine types cannot as it makes no sense - they either do not return a value (nothing to iterate) or they require a value to be sent back (operator++ is insufficient and the call must be made explicitly by the user, not the compiler)) - Moved CoroutineState to a slightly more accessible location - Added optional preprocessor macros to simplify working with coroutines: yield(), receive(), and yield_receive() depending on the type of coroutine being used. - Added missing Yield() and Receive() static functions accepting move parameters. Coroutines had non-static functions for that, but the static ones were missing. #review-16089 « |
10 years ago |
16083 | ShadauxCat |
OSX Compile fix #review-16084 |
10 years ago |
16081 | ShadauxCat |
Addressing tasks from previous review. #review-16082 |
10 years ago |
16070 | ShadauxCat | Fixed possible hang during ThreadManager::RunStaged() and ThreadManager::Sync() in a pre-e...mptive environment if the mailman thread happens to be pre-empted right after calling m_mailSyncEvent.Notify(). Probably a better fix for this will come in the future. I'm overall not fully sold on the current implementation of Sync(). #review-16071 « |
10 years ago |
16068 | ShadauxCat | Disabled backtrace unit test for Release / x86 on windows. CaptureStackTrace returns 0 fr...ames on optimized x86 builds - no way around that. Optimization usually kills backtraces anyway, and x86 is a disappearing platform, so I'm choosing not to care that release/x86 doesn't work for backtraces. #review-16069 « |
10 years ago |
16066 | ShadauxCat | Fixed a bug with Backtrace::ShutDown() on Windows. After shutting down the backtrace syst...em it could not be reinitialized. #review-16067 « |
10 years ago |
16060 | ShadauxCat | Merging using ShadauxCat.csbuild-brandon_m_bare | 10 years ago |
16054 | ShadauxCat |
Fixed a compile error due to renaming a file at the last minute... #review-16055 |
10 years ago |
16052 | ShadauxCat | - Changed default block size for concurrent queue to a more reasonable value - Changed so...me memory orders to memory_order_seq_cst when they don't actually need to be that to get around a bug in visual studio 2013 - debug builds assert when memory_order_acq_rel is used for a compare_exchange_strong (this is a standard library bug and is fixed in VS2015) - Added Event API - events are an alternative to condition variables that do not require a mutex and are guaranteed not to miss any signals, even if the signal comes while the thread is not listening for it. Unlike condition variables, however, they do not support broadcasting (and in fact, in general, are not safe to use with multiple threads listening for the same event simultaneously - though notifying on the same event is fine) - Rewrote ThreadManager around ConcurrentQueue and Event API so it is now lock-free. Also improved some behaviors of the staged thread manager operation so it now supports tasks that can be run on multiple stages via a bitmask. - Fixed an issue where the Coroutine copy constructor was calling the std::function constructor instead and another where initializing with a stack might try to call the wrong constructor and vice-versa - Fixed Coroutine never calling munmap() on its stack in linux and causing a memory leak - Added default arguments to time functions - Attempted to fix some issues with BinaryTree. Fixed some but not all. It's currently not suitable for use, sadly. - Logging Improvements: - - Added thread ID to logging - - Fixed some issues with category handlers - - Added backtraces - - Added the following additional log macros: - - - LOG_IF - - - LOG_EVERY_N - - - LOG_FIRST_N - - - LOG_IF_EVERY_N - - - LOG_IF_FIRST_N - - - LOG_ASSERT - - Added the ability to set extra info callbacks to get data such as script backtraces - - Removed the thread-related handlers and replaced them with RunHandler_Threaded and RunHandler_ThreadManager, which will enable any passed-in handler to be run in a threaded fashion - Removed StaticPoolAllocator and renamed DynamicPoolAllocator to PoolAllocator; adjusted unit tests accordingly - PoolAllocator now allocates its pool with mmap and VirtualAlloc, rather than with malloc - Fixed a bug with Vector copy assignment operator - Improved performance of StringBuilder considerably for cases where there are no modifier strings - Removed Copy-On-Write behavior of JSONToken as it was broken; copies are now performed with explicit DeepCopy() and ShallowCopy() functions - Fixed some parser bugs with JSONToken - Added iteration to JSONToken to iterate its children - Fixed crash when reading a negative number of bytes from a file - Changed StringBuilder to favor speed instead of memory by default - Added some performance unit tests for JSON token #review-16053 « |
10 years ago |
16051 | ShadauxCat |
Files needed by new unit tests. No review because it's all third-party. |
10 years ago |
15938 | ShadauxCat | -Fixed hang on build error on Windows -Fixed at least one case where projects could fail... to finish compiling with the "this is very bad and should never happen" error, but I don't think they're all fixed. -Fixed InterruptReturnCode on Windows, which has apparently different now after changes to the way keyboard interrupts are handled by csbuild #review-15939 « |
10 years ago |
15934 | ShadauxCat | Updated the readme for cppcon. | 10 years ago |
15891 | ShadauxCat | Concurrent queue implementation, plus updates to makefile in light of recent csbuild chang...es. #review-15892 « |
10 years ago |
15641 | ShadauxCat | -Added support for prebuilt projects using @csbuild.prebuilt - these fit into the project... hierarchy and take all the normal things a project can take, but are considered to always be Up-To-Date and are never built. These are used for referencing prebuilt third-party libraries. -Added support for shell projects using @csbuild.shellProject - these are a small variation on prebuilt in that they do not build, but they DO show up in generated IDE solutions, useful for things like projects that only contain headers or data files and never build, but need to be available for editing. -Improved csbuild's cleanup process - it now keeps track of its running processes and if it receives SIGTERM or SIGINT, it will immediately kill all of those running processes, remove any files they were in the process of writing (to ensure no corrupt data is left on disk), and terminate the GUI. It also now exits with os._exit() rather than sys.exit(), as sys.exit() is equivalent to 'raise SystemExit()' and can be caught and have other unintended side effects. This will ensure a quick exit with no corrupt files left around, no compile processes still running, no detached GUI, and no file descriptors remaining locked on Windows. -Fixed qtcreator projects not honoring c++11 support -Moved library verification out of build and into _make(), and made failed library verification a non-clean exit (i.e., ensures GUI is terminated) -Cleaned up some overly verbose logging that wasn't running previously due to the way SIGINT was being handled, but is now getting run again. #review-15572 « |
10 years ago |
15571 | ShadauxCat | Merge brandon_m_bare into mainline | 10 years ago |
15173 | ShadauxCat |
Disabling object scraping, it's broke. #review-15174 |
10 years ago |
14835 | ShadauxCat | Fixing compile errors in Linux that were introduced by fixing compile errors in Windows. ... #review-14836 « |
10 years ago |