summaryrefslogtreecommitdiffstats
path: root/core/debugger
Commit message (Collapse)AuthorAgeFilesLines
* [Net] Make debugger peer less CPU intensive.Fabio Alessandrelli2021-03-161-1/+6
| | | | | | | | | | | | Make sure that RemoteDebuggerPeer wait at least 100us between polls (effectively forcing a min tick of 100 microseconds). This greatly improve performances (the call to poll was useless since during low traffic, writes would always be available, and during high traffic, reads would always be available, effectively making it a busy-waiting loop). We could further improve this, by separating the two polls, and adjust the min tick based on load, but this is most likely more than enough already without sacrificing too much on high loads.
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* RemoteDebugger: Fix possible division by zeroRémi Verschelde2021-03-041-0/+1
|
* Modernize ThreadPedro J. Estébanez2021-01-292-9/+5
| | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* Update copyright statements to 2021Rémi Verschelde2021-01-0112-24/+24
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Merge pull request #44593 from madmiraal/rename-mainloop-methodsRémi Verschelde2020-12-283-7/+7
|\ | | | | Rename MainLoop methods to match Node methods
| * Rename MainLoop methods to match Node methodsMarcel Admiraal2020-12-223-7/+7
| |
* | Rename empty() to is_empty()Marcel Admiraal2020-12-283-8/+8
|/
* Merge pull request #43730 from qarmin/core_drivers_default_valuesRémi Verschelde2020-11-241-1/+1
|\ | | | | Initialize class/struct variables with default values in core/ and drivers/
| * Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut2020-11-231-1/+1
| |
* | Fix DebuggerMarshalls errors while profilingPouleyKetchoupp2020-11-231-1/+1
|/ | | | | Fixed check for array size before func_size: when func_size is 0 there's only 1 entry left and not 3.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-078-23/+23
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Refactor MethodBind to use variadic templatesreduz2020-10-181-1/+1
| | | | Removed make_binders and the old style generated binders.
* Remove String::find_last (same as rfind)Stijn Hinlopen2020-07-032-2/+2
|
* Added Custom Performance Monitor and feature to read intermediate values of ↵simpu2020-06-291-1/+21
| | | | | | | | | | | | | | | | Monitor Custom monitors can be added/removed/checked using `Performance.add_custom_monitor`/`Performance.remove_custom_monitor`/`Performance.has_custom_monitor` The value can be viewed in the `Monitor` tab of Debugger. Text before `/` is used to categorize the custom monitor. `EditorPerformanceProfiler` class is created to separate logic from `ScriptEditorDebugger` User can click on the graph of monitors to read the value at that point. Graph includes intermediate base lines.
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-3/+3
| | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-146-55/+103
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-148-71/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-23/+8
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Add support for multiple RemoteDebuggerPeer(s).Fabio Alessandrelli2020-05-126-31/+50
| | | | | It is now possible to register protocol handlers (default tcp://) to support additional debugging communication layers (e.g. websocket).
* Merge pull request #38522 from ThakeeNathees/printing-empty-string-fixRémi Verschelde2020-05-071-1/+1
|\ | | | | Fix: printing empty string does nothing in editor output pannel
| * Fix: printing empty string does nothing in editor output pannelThakee Nathees2020-05-071-1/+1
| | | | | | | | Fix: #38490
* | Format remote printerr properly in script debugger outputPouleyKetchoupp2020-05-012-6/+38
|/
* Rename InputFilter back to InputRémi Verschelde2020-04-281-6/+6
| | | | | | | | | | | | | | | | It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
* Merge pull request #37450 from SkyLucilfer/profilerBugRémi Verschelde2020-04-101-1/+1
|\ | | | | Fix profiler frame number stops updating when window is minimized
| * Fix profiler frame number stops updating when window is minimizedSkyJJ2020-03-311-1/+1
| |
* | Replace NULL with nullptrlupoDharkael2020-04-0210-25/+25
|/
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Renaming of servers for coherency.Juan Linietsky2020-03-273-12/+12
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Refactored input, goes all via windows now.Juan Linietsky2020-03-261-6/+6
| | | | Also renamed Input to InputFilter because all it does is filter events.
* Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-261-1/+2
|
* Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky2020-03-261-1/+1
|
* Style: Harmonize header guards to style guide [Core]Rémi Verschelde2020-03-251-1/+1
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-172-4/+4
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Fix various typosluz.paz2020-03-112-3/+3
| | | Found via `codespell`
* Fix -Wshadow=local warning in EngineDebuggerRémi Verschelde2020-03-101-3/+3
|
* Refactor ScriptDebugger.Fabio Alessandrelli2020-03-0813-0/+2889
EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling.