Age | Commit message (Collapse) | Author |
|
- Replace the misleading abuse of the m_transitions_enabled flag for the
fast path without lookup with a new m_initialized boolean that's set
either by Heap::allocate() after calling the Object's initialize(), or
by the GlobalObject in its special initialize_global_object(). This
makes it work regardless of the shape's uniqueness.
- When we're adding a new property past the initialization phase,
there's no need to do a second metadata lookup to retrieve the storage
value offset - it's known to always be the shape's property count
minus one. Also, instead of doing manual storage resizing and
assignment via indexing, just use Vector::append().
- When we didn't add a new property but are overwriting an existing one,
the property count and therefore storage value offset doesn't change,
so we don't have to retrieve it either.
As a result, Object::set_shape() is now solely responsible for updating
the m_shape pointer and is not resizing storage anymore, so I moved it
into the header.
|
|
We don't need to be allocating Strings for these names during static
initialization. The C-string literals will be stored in the .rodata ELF
section, so they're not going anywhere. We can just wrap the .rodata
storage for the class names in StringViews and use those in Object
registration and lookup APIs.
|
|
|
|
This also tightens the pledges.
|
|
|
|
This also tightens the pledges.
|
|
|
|
Add a dummy Arch/aarch64/boot.S that for now does nothing but
let all processor cores sleep.
For now, none of the actual Prekernel code is built for aarch64.
|
|
|
|
|
|
Set it to all the `-m`, `-display`, `-device` flags for Intel,
and to just "-M raspi3" for aarch64 builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This should help prevent deadlocks where a thread blocks on a Mutex
while interrupts are disabled, and makes it impossible for the holder of
the Mutex to make forward progress because it cannot be scheduled in.
Hide it behind a new debug macro LOCK_IN_CRITICAL_DEBUG for now, because
Ext2FS takes a series of Mutexes from the page fault handler, which
executes with interrupts disabled.
|
|
There's no reason to acquire the mutex for this resource before APs are
booted, before scheduling is enabled, and before interrupts are enabled.
|
|
Previously, we would try to acquire a reference to the all processes
lock or other contended resources while holding both the scheduler lock
and the thread's blocker lock. This could lead to a deadlock if we
actually have to block on those other resources.
|
|
There are callers of processes().with or processes().for_each that
require interrupts to be disabled. Taking a Mutexe with interrupts
disabled is a recipe for deadlock, so convert this to a Spinlock.
|
|
While it might not be as bad to release a mutex while interrupts are
disabled as it is to acquire one, we don't want to mess with that.
|
|
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.
|
|
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
```
|
|
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.
|
|
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.
|
|
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.
|
|
This adds just enough scaffolding to make cmake succeed.
The build falls over immediately.
|
|
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.
|
|
The gcc patch might not be completely correct, but at least the
toolchain completes building.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
Now the output of `ps -q <list>` is sorted according to the order the
user specified.
|
|
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.
|
|
|
|
No app-mail-settings icon exists (yet). app-mail is also what's being
embedded in the executable, so let's stick with it.
|
|
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.
|
|
With the move to LibConfig, these are no longer needed.
|
|
With the move to LibConfig, the wpath and cpath pledges are no longer
needed.
|
|
With the move to LibConfig, the wpath and cpath pledges are no longer
needed.
|
|
|
|
With the move to LibConfig, these are no longer needed.
|
|
|
|
With the move to LibConfig, these are no longer needed.
|
|
With the move to LibConfig, these are no longer needed.
|
|
With the move to LibConfig, these are no longer needed.
|
|
It's now been replaced with "${CMAKE_PROGRAM}" -E copy_if_different in
all previous usage locations.
|