Age | Commit message (Collapse) | Author |
|
Since we know exactly how much physical memory we'll need, we might as
well commit it up front instead of letting page faults drive it.
|
|
This is a step towards using Core::Object::add<T> more, which takes
care of parenting the newly created child automatically.
|
|
Consider the old pattern for creating a Core::Object parent and child:
auto parent = Core::Object::construct(...);
auto child = Core::Object::construct(..., parent);
The above was an artifact of the pre-reference-counting Object era.
Now that objects have less esoteric lifetime management, we can replace
the old pattern with something more expressive:
auto parent = Core::Object::construct(...);
auto child = parent->add<Core::Object>(...);
This reads a lot more naturally, and it also means we can get rid of
all the parent pointer arguments to Core::Object subclass constructors.
|
|
|
|
|
|
Fixes #1262
|
|
|
|
This does not work with shell completion yet, but the basics of being
able a cd being able to expand "~" to the current user's home directory,
and "~foo" to the home directory of user "foo" is added in this commit
Work towards: #115
|
|
|
|
|
|
This is simply meant to be a more efficient implementation in the
case that we only need to check a single character.
|
|
|
|
Compiling with -g adds roughly 30% to kernel build times. Anyone who
wants this can turn it on locally instead.
|
|
The Size column in the "File systems" tab of SystemMonitor
had a rendering artifact where the bounding box outline would
be drawn in the same location as the text. This makes the text
look strange and hard to read.
Pad the size with a signle space character on either side to
give the text a gap on each side.
|
|
|
|
|
|
|
|
Fixes #1272.
|
|
|
|
|
|
Each allocation header was tracking its index into the chunk bitmap,
but that index can be computed from the allocation address anyway.
Removing this means that each allocation gets 4 more bytes of memory
and this avoids allocating an extra chunk in many cases. :^)
|
|
Fixes #1271.
|
|
|
|
Nobody was using the 8-byte slab size, so get rid of it and move all of
its capacity to the new 64-byte slab size (which replaces 48-byte.)
|
|
|
|
This gives a huge speedup when running "git status" in a SerenityOS
repository directory. Most of the time was spent allocating strings.
|
|
When committing to a new executable, disown any shared buffers that the
process was previously co-owning.
Otherwise accessing the same shared buffer ID from the new program
would cause the kernel to find a cached (and stale!) reference to the
previous program's VM region corresponding to that shared buffer,
leading to a Region* use-after-free.
Fixes #1270.
|
|
When pressing the Left arrow key, we now travel to the parent_index()
of the currently selected index. Our implementation of parent_index()
was always returning an index with column 0, instead of using the
same column as the current index.
This prevented the selected item from looking selected.
|
|
We're still jumping through all kinds of silly hoops to load the new
format, and this commit only gets rid of the API for loading old files.
|
|
|
|
This makes unknown addresses accumulate their children together in the
treeview, which turns out to be a bit more useful than having hundreds
of unique garbage addresses each with their own subtree.
|
|
Since we're gonna throw away these stacks at the end of exec anyway,
we might as well disable profiling before starting to mess with the
process page tables. One less weird situation to worry about in the
sampling code.
|
|
You can now profile a program from start to finish by doing:
$ profile -c "cat /etc/passwd"
The old "enable or disable profiling for a PID" mode is accessible via:
$ profile -p <PID> -e # Enable profiling for PID
$ profile -p <PID> -d # Disable profiling for PID
The generated profile is available via /proc/profile like before.
This is far from perfect, but it at least makes profiling a lot nicer
to use since you don't have to hurry and attach to something when you
want to profile the whole thing anyway.
|
|
We now log the new executable on exec() and throw away all the samples
we've accumulated so far. But profiling keeps going.
|
|
ProfileViewer will now attempt to open /boot/kernel and use that to
symbolicate kernel addresses (anything above the 3GB mark.)
In other words, if you run ProfileViewer as root, on a profile that
was generated by root, you can now see kernel functions properly
as well. This is not available to non-privileged users.
|
|
This makes the time profiles look like the memory profiles so we can
use the userspace symbolication code in ProfileViewer.
|
|
It's not enough to just check that things wouldn't page fault, we also
need to verify that addresses are accessible to the profiled thread.
|
|
This basically never tells us anything actionable anyway, and it's a
real annoyance when doing something validation-heavy like profiling.
|
|
|
|
This commit adds two new behaviour to the key event handler of
the TreeView widget:
Pressing left now jumps to the parent node if the current treenode
is closed or has no children.
Pressing right now jumps to the first children node if the current
treenode is open.
|
|
Turns out that i_blocks does not take block list holes into account.
|
|
This is definitely a bug, but it seems to happen randomly every now
and then and we need more info to track it down, so let's log for now.
|
|
|
|
Linux creates holes in block lists for all-zero content. This is very
reasonable and we can now handle that situation as well.
Note that we're not smart enough to generate these holes ourselves yet,
but now we can at least read from such files.
|
|
|
|
InodeVMObjects can have nulled-out physical page slots. That just means
we haven't cached that page from disk right now.
|
|
The kernel sampling profiler will walk thread stacks during the timer
tick handler. Since it's not safe to trigger page faults during IRQ's,
we now avoid this by checking the page tables manually before accessing
each stack location.
|
|
This avoids getting page faults while storing samples in the timer IRQ.
|
|
|
|
We're not equipped to deal with page faults during an IRQ handler,
so add an assertion so we can immediately tell what's wrong.
This is why profiling sometimes hangs the system -- walking the stack
of the profiled thread causes a page fault and things fall apart.
|