summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/profiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* emu/profiler.cpp: Disable assertion that profiler isn't enabled/disabled ↵ Vas Crabb2023-03-271-1/+2
| | | | with profile scope active.
* Various optimisations to code generaton. Vas Crabb2023-03-261-1/+1
| | | | | | | | | | | | | | | util/bitmap.cpp, util/palette.cpp: Marked lots of things constexpr. Bitmaps don't throw exceptions on allocation failure, they just become invalid. Almost nothing in MAME actually checks for this. emu/profiler.cpp: Abort if the profile stack overflows rather than throwing an exception. This is a developer feature and if it overflows, the code is broken. Calling a noreturn noexcept function generates less code than throwing an exception, which adds up. util/strformat.cpp: Traded away some unnecessary flexibility for more compact code. The stream objects must derive from std::basic_ostream now - they can't just be any old objects with the expected operators.
* -Lua engine: run everything in coroutines. (#11019) Vas Crabb2023-03-251-3/+4
| | | | | | | | | * This lets you use emu.wait(...) directly without mucking around creating coroutines. * Allow emu.wait to accept an attotime argument. * Added a couple more wait helper functions. -emu/profiler.h: Actually use scope-based profiling helpers. * This makes the comment at the top of emu/profile.h less dishonest, and makes it easier to write exception-safe code. * Got rid of some do { ... } while (0) loops that only existed so break could be used like a goto.
* Fairly significant overhaul of Lua engine and some cleanup. Vas Crabb2020-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The things that were previously called device iterators are not iterators in the C++ sense of the word. This is confusing for newcomers. These have been renamed to be device enumerators. Several Lua methods and properties that previously returned tables now return lightweight wrappers for the underlying objects. This means creating them is a lot faster, but you can't modify them, and the performance characteristics of different operations varies. The render manager's target list uses 1-based indexing to be more like idiomatic Lua. It's now possible to create a device enumerator on any device, and then get subdevices (or sibling devices) using a relative tag. Much more render/layout functionality has been exposed to Lua. Layout scripts now have access to the layout file and can directly set the state of an item with no bindings, or register callbacks to obtain state. Some things that were previously methods are now read-only properties. Layout files are no longer required to supply a "name". This was problematic because the same layout file could be loaded for multiple instances of the same device, and each instance of the layout file should use the correct inputs (and in the future outputs) for the device instance it's associated with. This should also fix video output with MSVC builds by avoiding delegates that return things that don't fit in a register.
* emu: correct some file headers (nw) hap2020-06-191-1/+1
|
* Added support for profiling LUA npwoods2019-07-241-0/+1
|
* Changed the profiler to use std::ostringstream as the text sink (instead of ↵ Nathan Woods2017-05-301-6/+8
| | | | std::string)
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-3/+3
| | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-3/+3
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* Replace strformat, strprintf and strcatprintf with type-safe steam_format ↵ Vas Crabb2016-02-281-3/+3
| | | | | | | | | and string_format Update MAME to use new function Instantiate ODR-used static constant members Make some of the UI code more localisable Remove use of retired functions in tools
* reverting: Miodrag Milanovic2016-01-201-1/+1
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* tags are now strings (nw) Miodrag Milanovic2016-01-161-1/+1
| | | | fix start project for custom builds in Visual Studio (nw)
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-4/+4
|
* Fixed some suggestions by ReSharper C++ (nw) Miodrag Milanovic2015-11-141-3/+3
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+229