summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-28Kernel: Don't disable interrupts in validate_inode_mmap_protAndrew Kaster
There's no need to disable interrupts when trying to access an inode's shared vmobject. Additionally, Inode::shared_vmobject() acquires a Mutex which is a recipe for deadlock if acquired with interrupts disabled.
2021-08-28LibELF: Apply some minor optimizations to symbol lookupBrian Gianforcaro
Optimizations: - Make sure `DT_SYMTAB` is a string view literal, instead of string. - DynamicObject::HashSection::lookup_sysv_symbol should be using raw_name() from symbol comparison to avoid needlessly calling `strlen`, when the StrinView::operator= walks the cstring without calling `strlen` first. - DynamicObject::HashSection::lookup_gnu_symbol shouldn't create a symbol unless we know the hashes match first. In order to test these changes I enabled Undefined behavior sanitizer which creates a huge amount of relocations, and then ran the browser with the help argument 100 times. The browser is a fairly big app with a few different libraries being loaded, so it seemed liked a good target. Command: `time -n 100 br --help` Before: ``` Timing report: ============== Command: br --help Average time: 3897.679931 ms Excluding first: 3901.242431 ms ``` After: ``` Timing report: ============== Command: br --help Average time: 3612.860107 ms Excluding first: 3613.54541 ms ```
2021-08-28UserspaceEmulator: Profiles are now expected to have a `strings` arrayBrian Gianforcaro
The kernel profiles were recently changed to have a `strings` array as part of the profile objects. The `ProfileViewer` now checks for that during startup and declares the profile invalid if the array is not present. The UserspaceEmulator doesn't use the API which the kernel exposed the string array for, so just fake it by always adding an empty array to the generated profiles.
2021-08-28UserspaceEmulator: Make generated profiles debugable with cli toolsBrian Gianforcaro
The fact that profiles are json on one giant line makes them very difficult to debug when things go wrong. Instead make sure to wrap each event or sample on a newline so you can easily grep/heap/tail the profile files.
2021-08-28Shell: Use a relative path in builtin_cd for chdir if possibleAli Mohammad Pur
This kinda sorta addresses the Shell side of #9655, however the fact that `chdir` (and most other syscalls that take paths) are artifically limited to a length of PATH_MAX remains.
2021-08-28CMake: Let `Meta/serenity.sh run aarch64` make it past cmakeNico Weber
This adds just enough scaffolding to make cmake succeed. The build falls over immediately.
2021-08-28LibELF: Reindent .S files to be consistent with other .S filesNico Weber
Most .S files don't indent directives, so don't indent them here either. Also, one file had tabs instead of spaces, `:retab` that file.
2021-08-28Toolchain: Enough to make `rebuild-toolchain aarch64` workNico Weber
The gcc patch might not be completely correct, but at least the toolchain completes building.
2021-08-28Toolchain: Regenerate binutils.patch and gcc.patchNico Weber
I locally modified Meta/serenity.sh to pass `--dev` to BuildIt.sh in build_toolchain(). Then I ran `Meta/serenity.sh rebuild-toolchain`, cd'd into Toolchain/Tarballs/binutils-2.37, `git add`ed unadded files in `git status`, and then ran `git diff > ../../Patches/binutils.patch`. Then I did the same for Toolchain/Tarballs/gcc-11.2.0 (and was careful not to `git add` serenity-kernel.h, since that's created by Toolchain/BuildIt.sh). No behavior change. This just rewrites the patch like git writes it.
2021-08-28Spreadsheet: Use strict mode for runtime.jsLinus Groh
2021-08-28Spreadsheet: Replace loose with strict equality operators in runtime.jsLinus Groh
2021-08-28Spreadsheet: Remove custom JS string split function implementationLinus Groh
2021-08-28Spreadsheed: Call native functions in runtime.js on thisSheetLinus Groh
I think this *should* be working as-is, but there's probably something wrong with the this value of native functions. Either way, not relying on the implicit this value will allow us to use strict mode here eventually. Fixes #9240.
2021-08-28ps: Sort using input order in case of `-q`Mahmoud Mandour
Now the output of `ps -q <list>` is sorted according to the order the user specified.
2021-08-28ps: Select specific processes by their PIDsMahmoud Mandour
This adds a `-q` option, which expects a comma-separated list of PIDs as a value. On using it, only the processes associated with the supplied PIDs are output.
2021-08-28MailSettings: Remove proc and exec from plegesLinus Groh
2021-08-28MailSettings: Use the app-mail icon for the windowLinus Groh
No app-mail-settings icon exists (yet). app-mail is also what's being embedded in the executable, so let's stick with it.
2021-08-28Meta: Let serenity.sh's TARGET default to SERENITY_ARCH, not i686Linus Groh
This environment variable is already widely used across our build scripts and tooling, so serenity.sh should respect it as well. It still uses i686 as the fallback.
2021-08-282048: Remove wpath and cpath pledgesLuke Wilde
With the move to LibConfig, these are no longer needed.
2021-08-28Spider: Remove wpath and cpath pledges and pledge earlierLuke Wilde
With the move to LibConfig, the wpath and cpath pledges are no longer needed.
2021-08-28Solitaire: Remove wpath and cpath pledges and pledge earlierLuke Wilde
With the move to LibConfig, the wpath and cpath pledges are no longer needed.
2021-08-28Chess: Perform pledges earlierLuke Wilde
2021-08-28FlappyBug: Remove wpath and cpath pledgesLuke Wilde
With the move to LibConfig, these are no longer needed.
2021-08-28GameOfLife: Add pledge and unveilLuke Wilde
2021-08-28Pong: Remove wpath and cpath pledgesLuke Wilde
With the move to LibConfig, these are no longer needed.
2021-08-28Snake: Remove wpath and cpath pledgesLuke Wilde
With the move to LibConfig, these are no longer needed.
2021-08-28Minesweeper: Remove wpath and cpath pledgesLuke Wilde
With the move to LibConfig, these are no longer needed.
2021-08-28Meta: Remove write-only-on-difference scriptAndrew Kaster
It's now been replaced with "${CMAKE_PROGRAM}" -E copy_if_different in all previous usage locations.
2021-08-28Everywhere: Move all host tools into the Lagom/Tools subdirectoryAndrew Kaster
This allows us to remove all the add_subdirectory calls from the top level CMakeLists.txt that referred to targets linking LagomCore. Segregating the host tools and Serenity targets helps us get to a place where the main Serenity build can simply use a CMake toolchain file rather than swapping all the compiler/sysroot variables after building host libraries and tools.
2021-08-28StateMachineGenerator: Don't move() return value from actions()Andrew Kaster
With the proper warnings enabled, this gives a Wpessimizing-move warning
2021-08-28LibWeb: Use foreach to generate wrapper targets and tidy up CMakeListsAndrew Kaster
Gather the custom commands for each of the 6 bindings generated targets for libjs_js_wrapper invocations into some lists so that we can foreach over the lists instead of having 6 copy pasted commands with one or two things modified for each one. Additional refactoring, use target_sources command to inform CMake about additional source files for LibWeb, but only after it's been declared as a library via add_library. Also avoid use of the write_if_different script and use cmake -E copy_if_different instead. This lets us express the actions in rules that CMake understands without going to an external source file. It exposes a few optimization opportunities for the code generators to accept an output filename instead of always going to stdout.
2021-08-28Meta+LibUnicode: Move unicode_data helper to Meta/CMakeAndrew Kaster
Moving this helper CMake file to the centralized Meta/CMake folder helps to get a better grasp on what extra files are required for the build, and what files are generated. While we're at it, don't use add_compile_definitions for ENABLE_UNICODE_DATA, which only needs to be seen by LibUnicode sources.
2021-08-28Meta: Prefer SerenityOS_SOURCE_DIR to CMAKE_SOURCE_DIRAndrew Kaster
By using SerenityOS_SOURCE_DIR we can make custom targets and commands agnostic to the actual location of the root CMakeLists directory. All we care about is the root of the SerenityOS project.
2021-08-28Meta: Move code generator helpers to their own CMake helper fileAndrew Kaster
compile_gml, compile_ipc, and generate_state_machine all use host tools to generate sources for the target build. As part of trying to organize host tools into a common area, let's move these helper rules to a common file that we can add other host tools to later. And, keep the host tool helpers separate from the CMake target helpers for apps and libraries.
2021-08-28Meta: Move components CMake helpers to their own fileAndrew Kaster
It's hard to follow how all the functions in the utils.cmake helper file flow together, so let's move the pieces that are related to each other into specialized helpers. First up: all the ConfigureComponents related properties and functions.
2021-08-28Utilities: Add a command line client for ConfigServerRalf Donau
This is an alternative to the ini utility which accesses the configuration files through the newly introduced ConfigServer.
2021-08-28shot: Get only cropped region from WindowServerMustafa Quraish
Previously, we were always getting the full screen(s) bitmap from the WindowServer and cropping it manually. The `get_screen_bitmap` function already took in a `crop_region`, so we are now utilizing that.
2021-08-28WindowServer: Always return properly cropped bitmapMustafa Quraish
Previously, when `screen_index` was not provided when calling `ClientConnection::get_screen_bitmap`, the bitmap that was created was always the size of the bounding rect of the screen. The actual screen bitmap was being cropped, but the bitmap being returned was of the original size with just black pixels everywhere else.
2021-08-28LibGUI: Select common location on Filepicker startupSimon Danner
2021-08-28LibUnicode: Change unzip commands to also extract subdirectoriesRobert Syring
Changed unzip commands from * to ** in order to also extract subdirectories from cldr.zip.
2021-08-28PixelPaint: Always change cursor when active tool is setMustafa Quraish
Previously, if you used one of the keyboard shortcuts to select a different tool, it didn't change the cursor to the corresponding one till you clicked somewhere / did something else to trigger an update. This was pretty jarring since there's no indication as to whether the tool change was successful or not. This patch just calls `set_override_cursor()` when a valid active tool is set to immediately update it.
2021-08-27Documentation: Add configuration information for VSCodekleines Filmröllchen
This is a combination of the efforts of multiple people and hours of pain trying to configure VSCode properly. This should give a good baseline for anyone trying to develop Serenity with VSCode. Co-authored-by: Hendiadyoin1 <leon2002.la@gmail.com>
2021-08-27LibJS: Implement Temporal.ZonedDateTime.prototype.eraYearLinus Groh
2021-08-27LibJS: Implement Temporal.ZonedDateTime.prototype.eraLinus Groh
2021-08-27LibJS: Implement Temporal.PlainYearMonth.prototype.eraYearLinus Groh
2021-08-27LibJS: Implement Temporal.PlainYearMonth.prototype.eraLinus Groh
2021-08-27LibJS: Implement Temporal.PlainDateTime.prototype.eraYearLinus Groh
2021-08-27LibJS: Implement Temporal.PlainDateTime.prototype.eraLinus Groh
2021-08-27LibJS: Implement Temporal.PlainDate.prototype.eraYearLinus Groh
2021-08-27LibJS: Implement Temporal.PlainDate.prototype.eraLinus Groh