67421 Commits

Author SHA1 Message Date
Augustin Cavalier
8854ac7e4c Tracker: Fix crash when trying to empty Trash.
Another regression from yesterday's refactor.
hrev58609
2025-02-06 12:39:37 -05:00
Pascal Abresch
ff0dd27345 WebPositive: remove gopher from supported protocols
Goodbye sweet prince!
This hasen't worked for quite some time, Webkit uses the curl backend
currently which has no support for gopher.

Our netkit backend also never "truely" supported gopher, instead
translating pages to html with some prebuild styles, those also don't
use the CSS system colors, for lack of existence back then.

Change-Id: I5d5098db9512bb22cde8c17fa1553637b30ae65b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8938
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58608
2025-02-06 17:26:58 +00:00
Augustin Cavalier
a52800c6db Tracker: Properly check fOwning before deleting items in RemoveItem. hrev58607 2025-02-06 02:18:52 -05:00
Augustin Cavalier
cd482d648c kernel: Fix USE_GUARDED_HEAP_FOR_OBJECT_CACHE after object_cache refactors.
And allow it to be enabled even if the guarded heap itself
technically is not.
hrev58606
2025-02-05 19:12:22 -05:00
Augustin Cavalier
cbfbbf6d4d Change BObjectList to take "owning" as a template parameter and adjust all consumers.
Since BObjectList is a template class, this only breaks ABI where
BObjectList was exposed in public methods, and even then it's only
a name mangling break and we should be able to add compatibility
methods if necessary.

(The old "bool owning" member variable is left intact for ABI
compatibility, for the moment, though it's otherwise unused now.)

Tracker's PoseList is the only remaining type that has a "bool owning"
switch in the constructor rather than template parameters.

This should significantly improve the output of static code analysis
tools that previously detected list operations as causing use-after-frees
and double-frees, as well as make code maintenance easier by making it
easier to determine what list owns (or does not own) an object.
It should also be a minor performance optimization, since the branches
for calls to delete/free should now be optimized out altogether.

Still boots to desktop and Tracker, Deskbar, Debugger all tested
and verified as working.

Change-Id: If2a24a6f0d22e7a506ef554fcfdd328907279ed4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8915
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58605
2025-02-06 00:06:32 +00:00
Augustin Cavalier
007126ed6f Keymap: Change GetModifiedCharacters API to return BStringList.
Simplifies the API and makes ownership semantics clearer.

Change-Id: I59d2e3ef8055253e85943500fb65356762055c54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8914
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-02-06 00:06:32 +00:00
Augustin Cavalier
3e245f7b20 Tracker & Deskbar: Use BStringList instead of BObjectList<BString>.
It's more efficient, and conveys ownership semantics more clearly.

Change-Id: Ia42b018faaa7c8c7347020afbf1be9dfafe0fed8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8913
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-02-06 00:06:32 +00:00
John Scipione
49d3b2a142 Tracker: Fixup hardcoded values for ModelMenuItem padding
This is to make BMenuBar and BMenu margins the same.

The hardcoded menu item margin numbers come from this math on what the
BMenu and BMenuBar item margins respectively used to be a long time ago:
14 - 8 = 6 // for left margin
(14 + 20) - (8 + 8) = 18 // for left + right margin

We have since updated these margins so they need to be recalculated.
Use BPrivate::MenuPrivate to get the new margin deltas.

IconMenuItem and ModelMenuItem classes are used by Tracker add-ons and
those can be in the menu bar as well.

Change-Id: Ie4147c31e6b19764cb36b9c414f7e91c47b7d9bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8905
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
hrev58604
2025-02-05 16:38:08 +00:00
Jérôme Duval
b5eb38ec58 shared: use the correct delete for array
to silence libasan on libtracker.so

Change-Id: I7c634271f4ec2b4ca0d5f76c18ddbfc7dddf2793
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8910
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
hrev58603
2025-02-05 16:35:47 +00:00
Jérôme Duval
b71707da2c kernel: comment should match the guard macro
Change-Id: I4cfa9eda18f3502e50adff9ffa8ded47f318f372
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8909
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
hrev58602
2025-02-05 16:35:23 +00:00
John Scipione
def8a585fa BuildSetup: ld on darwin does not support --no-as-needed
Change-Id: I2f5ada95d5f8b346374aebc3a1a8114f345cb29f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8906
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58601
2025-02-04 17:27:04 +00:00
Jérôme Duval
d59339ff6c x86_cstates: disable C5 and C6 states on Skylake
could help with #19341

see https://bugzilla.kernel.org/show_bug.cgi?id=109081

Change-Id: Ide72f46193093c3c4695c39d4466e9418808cbd0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8881
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58600
2025-02-04 17:22:34 +00:00
Jérôme Duval
6c380f3c8e kernel/x86: add definitions for cpuid leaves
remove feature_5_ecx

Change-Id: I247a37c875e5dd04f2239fdceeef67e402b1245d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8880
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2025-02-04 17:22:34 +00:00
PulkoMandy
af5f256338 InterfaceDefs: complete ASCII control char definitions
Make it clear that this enum just defines ASCII control characters, and
there is no 'free space'. Also add comment showing which key combination
produces each control character.

Change-Id: I01884132842281cce6c13dd9398b1aeddadae58a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8899
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58599
2025-02-04 17:19:28 +00:00
Augustin Cavalier
1283ca4cf4 unzip: Restore crypt.h.
This is still needed even if crypt.c now isn't.
hrev58598
2025-02-04 01:16:22 -05:00
Augustin Cavalier
a1448cbdcd unzip: Drop unneeded files and Jam rules.
We only use this for the host tools now, so a lot of the files
can just be deleted altogether.
hrev58597
2025-02-04 01:13:06 -05:00
Augustin Cavalier
97d45387df headers/find_directory_private: Don't rely on <sys/cdefs.h>.
This header is included by the build headers, and musl doesn't
provide sys/cdefs.h.

Fixes the build of the standard host tools under musl.
2025-02-04 01:13:06 -05:00
Augustin Cavalier
62f8ef3a7f BuildSetup: Clean up HOST_KERNEL and linking rules.
* Drop all HOST_KERNEL_* definitions, they aren't used or needed
   anymore, it seems.

 * Use --no-as-needed unconditionally; it works under Clang+LLD now.
   (and indeed it's still needed for the "unzip" host tool to
   compile and link properly.)

 * Drop --copy-dt-needed-entries. It was added around the time of
   GCC 10, but it seems that it's not needed anymore, or at least I
   did a minimum build having compiled the host tools without it
   and all seemed to be fine. Furthermore, it seems lld doesn't support
   it, so this fixes the build under FreeBSD and other platforms
   that also don't use ld.bfd same as Darwin/macOS.
2025-02-04 01:13:06 -05:00
Jérôme Duval
aedcf2476d virtualkeyboard: update keymap when it changed
load current keymap on start

Change-Id: I1030cf5aaf9641f7e915f8fc10dec3144cab014f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8904
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58596
2025-02-03 21:27:47 +00:00
Niklas Poslovski
6670202514 ControlLook: Use B_PANEL_TEXT_COLOR for scrollbar arrows
Change-Id: I7a291842eeaaba00176cb4473a075fad1d3d6293
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8895
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58595
2025-02-03 17:18:51 +00:00
Jérôme Duval
0328ffe12a virtualkeyboard: add a hook for ScreenChanged()
Change-Id: I18d2a4e7e29858406c75dae54c6ea6c5f5e0c26b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8903
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58594
2025-02-03 17:14:39 +00:00
Jérôme Duval
9d2283baab virtualkeyboard: style fixes
Change-Id: Iee76c0cae38a0677b60e51f73aa0e2e5d9b7c2ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8902
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-02-03 17:14:39 +00:00
Jérôme Duval
c8cd427e30 build: extend stack protection
* use -fstack-protector-strong and -fstack-clash-protection
* also bin and some user add-ons

Change-Id: I593365e55414ac447bde54980a5c73202e9bb172
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8887
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
hrev58593
2025-02-03 17:14:18 +00:00
Pascal Abresch
e4c39f6a93 build: use command -v instead of which
Change-Id: Iec85bc1a2d5f2f3a88eae66ae1883c1301e1d3ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8875
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
hrev58592
2025-02-03 14:13:34 +00:00
John Scipione
5610706bb6 BMenuItem: Remove _DrawFunctionChar() cruft added in hrev58589
Change-Id: I7fbc1dc194be91705646f6e822d03e9773bd649a
hrev58591
2025-02-03 02:39:27 -05:00
John Scipione
16c6cc4418 BTextView: Fixup AdoptSystemColors() and HasSystemColors()
Replace private _UsesSystemColors() with public HasSystemColors()
and make sure to consider the tints when checking if system colors
are used or not.

Document HasSytemColors() in the Haiku Book.

Change-Id: I78de4904d5ddb24b98ad27eb93d4e5ccb330d76a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8897
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58590
2025-02-03 00:14:52 +00:00
John Scipione
74ef92bc55 BTextView: Update word-wise/line-wise shortcuts
... and set alternates. This is updated because we can now set
shortcuts without B_COMMAND_KEY. Setup Alt for Win/Linux mode.

* Word-wise shortcuts Option+arrows.
* Line-wise shortcuts Alt+arrows AND Ctrl+arrows for
  Win/Linux mode and for when there's a conflict.

Otherwise these shortcuts are not expected to conflict.

Add shortcuts for Alt+Backspace and Alt+Delete to delete to
the beginning or end of line instead of word.

Split out vertical and horizontal shortcuts so that if one is
used by an app we at least get the other one.

Fixes #9913

Change-Id: I0124fec7df4585a70ded8d3e7bf2aa8cb4acecb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7289
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
hrev58589
2025-02-02 19:18:35 +00:00
John Scipione
58339b6be4 Tracker: Change "Move to Trash" shortcut to plain DEL
... without Command. Shift+B_DELETE to skip Trash.

Change-Id: Ibd334b62154f488b91d1e0aaf287f478724f38a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7178
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
2025-02-02 19:18:35 +00:00
John Scipione
540ae21864 MediaPlayer: Delete playlist items use plain old delete
... fixing a TODO now that #7078 is fixed.

There are 2 remove playlist actions: 'Remove' and 'Move file to Trash'

* 'Remove' playlist shortcut: Cmd+Delete => Delete
  (This also works from the main window to remove the file you're
   currently focused on/listening to from the playlist.)
* 'Remove file from playlist' shortcut has been removed. We have
  decided not to Trash files from MediaPlayer's playlist anymore,
  you'll have to trash the files from a regular Tracker window.

The 'Remove' shortcut gets plain old delete as the author intended.

Change-Id: I3b1e19405e029d9c5f398cfd7a8dbab49fb21fc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7292
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Reviewed-by: John Scipione <jscipione@gmail.com>
2025-02-02 19:18:35 +00:00
John Scipione
1e2091ced5 Interface Kit: Add support for shortcuts w/o Command
Introduce B_NO_COMMAND_KEY modifier that is used when a
shortcut has no Command modifier, otherwise B_COMMAND_KEY
modifier is added.

This is conceptually different from B_NO_MODIFIERS in that it
allows other modifiers such as B_CONTROL_KEY, B_SHIFT_KEY and
B_OPTION_KEY to be added to a shortcut, but not B_COMMAND_KEY.

This option is required to remove B_COMMAND_KEY because the
Command modifier is assumed to be present on all shortcuts.
This allows us to break this assumption without breaking apps
written before this change and assume B_COMMAND_KEY to be
present even if it has not been explictly added.

Document B_NO_COMMAND_KEY in BMenuItem and BWindow docs.

Fixes #7078

Co-authored-by: X512 <danger_mail@list.ru>
Co-authored-by: Ryan Leavengood <leavengood@gmail.com>

Change-Id: If0e20cd848112898f4425ede8c17231dc50deb8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7293
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
2025-02-02 19:18:35 +00:00
Lt-Henry
a5f92820b7 pch_i2c: added support for amd i2c devices
* fixed fifo depth may overflow on uint8
* Created pci/acpi device list with its respective platform version. This will allow us to toggle specific platform registers

Change-Id: I6f4f63649eb62fbc9480e97ad0aa16125458ce7e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8888
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
hrev58588
2025-02-02 18:12:54 +00:00
Augustin Cavalier
370b0c014d FAT: Better isolation from host headers for the fat_shell.
Fixes the build on FreeBSD.
hrev58587
2025-02-01 16:48:38 -05:00
Augustin Cavalier
78dd36e7cb Some build fixes for FreeBSD.
* Drop endian.h; no longer needed as FreeBSD provides its own
   (and this conflicts with some other things later in the build.)

 * Needs libgnuregex; enable and adjust paths.

Doesn't fully work yet. The fixes in the next commit for fat_shell
plus some other build system tweaks are still needed.
2025-02-01 16:48:11 -05:00
John Scipione
69970cdd5b Tracker: Open file location on double click from Query fix
Regression from hrev58560.

Originally: `be_app->PostMessage(&message);`
In hrev58560 it was changed to: `Window()->PostMessage(&message);`
Now: `BMessenger(kTrackerSignature).SendMessage(&message);`

The distinction between original and now is for if Tracker is being
used as a kit, in practice this shouldn't make a difference.

hrev58560 was not correct though.

Fixes #19381

Change-Id: Ia48a8adcf2c9853e8309266369ccf7452c20a679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8890
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58586
2025-02-01 21:36:11 +00:00
Jérôme Duval
3805924471 kernel: fix warning
warning: "user_strlcpy" redefined
Change-Id: I2a0a4307e1ca8904ced7eafb498f9ea94d538362
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8893
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58585
2025-02-01 20:21:26 +00:00
Jérôme Duval
cb5d195553 fs_shell: fix warning
warning: too many arguments for format [-Wformat-extra-args]
Change-Id: If35737dc2fe193923aa1d756cfd10ca6d820a09e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8892
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2025-02-01 20:21:26 +00:00
Jérôme Duval
f9af89e754 RemoteMessage.h: fix warning
error: 'rectCount' may be used uninitialized [-Werror=maybe-uninitialized]
Change-Id: Id899f6ef9c249861dbe286a71109c461501519b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8891
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2025-02-01 20:21:26 +00:00
Autocomitter
622603f103 Update translations from Pootle hrev58584 2025-02-01 08:12:21 +00:00
John Scipione
56dce2b3d4 Tracker: Insert "Mount >" menu at the right location
Fixes #19388 a regression from hrev58560

Change-Id: Iec03b278aa88c5e544962130c6942c5497598b67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8884
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58583
2025-01-30 05:06:48 +00:00
Augustin Cavalier
e33dbdc1a3 libroot: Import some more string functions from musl.
Also enable some optimizations on newer GCC.

Change-Id: Ideb92aae85e6f8f502af61145046ea1b4a514e8a
hrev58582
2025-01-29 20:54:19 -05:00
Augustin Cavalier
f294fe2a39 Reintroduce aligned-pointers optimization for strcmp.
It was initially added by tqh in ac827a2baa5e0c486b554cdee56c72624b499a40,
but was later removed in 39a81e5ac632d3356ebd4c0b40fb24aa3228833d
due to being rather broken.

This new version is loosely based on that design, but removes the
comparison logic out of the loop and lets the unaligned version
deal with the actual per-character comparison.

Saves around 0.1s out of 3.5s in the best case in a "jam -q HaikuDepot"
run with nothing to do (and that's only comparing with different
libroots on the same kernel; as this strcmp is used in the kernel as
well, we will benefit from this optimization there, too.)
hrev58581
2025-01-29 18:27:01 -05:00
Jim906
1c0da902ab userlandfs: Ensure room for requests in port
* Add a parameter to RequestAllocator::AllocateAddress and ::AllocateData
  that allows the client to specify a minimum amount of free space that
  must remain in the port buffer.
* Make use of the new parameter in some operations that can fail
  without it.

The Port buffer can be used to store data associated with a Request.
For some file system operations, further requests must be sent through
the port (by calling AllocateRequest) after reserving port buffer
space for data. Unlike AllocateAddress and AllocateData, which can
use an area if the data is larger than the port buffer capacity,
AllocateRequest can only allocate space in the port buffer. If data
previously allocated in the port buffer happens to be large enough to
fill it, then these further AllocateRequest calls will fail.

Change-Id: If03e0afdfbd9fbc36f0e1a04b5d0a20031932b91
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8866
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58580
2025-01-29 17:17:16 +00:00
Pascal Abresch
83e4b8867e storage: disk_device/DiskSystem: remove useless comments
Change-Id: I751ca483c5790817e31c8e513cd41267a8be664e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8876
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
hrev58579
2025-01-29 14:35:09 +00:00
Augustin Cavalier
6db0402021 kernel/vm: Commit missed change to VMVnodeCache. hrev58578 2025-01-28 18:47:04 -05:00
Augustin Cavalier
72162cc730 kernel/vm: Put name argument first in VMCache::Init.
This seems to make more logical sense.
hrev58577
2025-01-28 17:55:27 -05:00
Augustin Cavalier
46aa69c2f6 kernel/fs: Make sIOContextRootLock an rw_lock.
Most of the time we only need to read it, not modify it, so
this saves some contention.
hrev58576
2025-01-28 16:46:59 -05:00
Augustin Cavalier
fb3a70af79 kernel/vm: Give VMCaches better names.
This helps with debugging and reading scheduling reports.
2025-01-28 16:40:27 -05:00
Augustin Cavalier
382ddca7fc kernel/vm: Choose pre-map size based on cache fault count.
The GCC "cc1plus" binary is over 40MB, so pre-faulting at most 10MB
of it only helped so much. Now, we map 1 MB for every time the cache
has been faulted "in full". This should warm up quite rapidly during
compile jobs, and stabilize after that (with future faults mostly
being CoW.)

Only active (accessed+used) pages will get pre-mapped anyway, so if
on a long-running system the page daemon debuffs all the pages in a
cache, we would just iterate through all of them but not map any here.
If that overhead proves to be a problem in the future, we can optimize
for it then (probably by keeping track of how many pages are eligible
for pre-mapping in this way.)

This significantly reduces lock contention in compile jobs. Compiling
libroot with a generated directory on ramfs and -j4, best of 3 runs:

before:
real    0m43.017s
user    1m2.811s
sys     0m24.900s

after:
real    0m29.367s
user    1m0.321s
sys     0m13.373s
Change-Id: I441abf43803c8666cdc13c6d007bc04439698b0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8874
Reviewed-by: Michael Lotz <mmlr@mlotz.ch>
hrev58575
2025-01-28 21:23:38 +00:00
Augustin Cavalier
17c3890ce1 kernel/vm: Track fault and copy counts in VMCache.
This solves a TODO for reporting CoW counts in area_info, and paves
the way for adaptive handling of pre-faulting based on how many
faults a cache has handled.

Change-Id: I4ecd7cf46b794c51acac87184fef49ea5ce76743
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8873
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-28 21:23:38 +00:00
Augustin Cavalier
b2b3e71456 KPath: Remove memset after allocate.
We don't really need to clear these buffers, as they're basically
always used with user_strlcpy or precisely sized buffers, so there
should be no risk of "leaking" information to userland.
hrev58574
2025-01-28 12:30:52 -05:00