This used to be the default in haikuporter, but it isn't anymore. This
resulted in source packages (which are needed for bootstrap) not being
generated.
The drawing code in the package list view is now
unified with other places where the rating stars are
being displayed.
Change-Id: I6a8fef51a6ddc57d10cd62a98a26a65de9cd91c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7879
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Otherwise, it seems compiler will optimize the assign operation into
a call of the first constructor, meaning the thread's syscall flag
won't be set properly.
Fixes #18951.
Instead of doing the checks in profiling_do_sample, we now do them
in profiling_event. This allows some comments to be consolidated
and make the logic clearer (but it should be functionally the same.)
Also add a check that profiling is still happening at the end
of profiling_flush.
Instead of taking the sample inside the timer callback
or the flush callback depending, always take it in the timer
callback, for consistency's sake. This should always work
because we try to flush the buffer when it's only 70% full;
in testing I can't recall seeing any dropped ticks.
Also add a flush call in the post_syscall hook, in case
we hit the flush threshhold while profiling in the kernel
and couldn't trigger the flush then.
Seems to significantly reduce "missed" ticks overall,
but there are still wildly inconsistent results and
lots of missing time.
Change-Id: I43a5e9c050a50309329da39f8a2386c3e2b3c0dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7851
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Before this, changing the locale settings via Locale preflet required
a reboot in order for the changes to get picked up by programs running
on Terminal.
Fixes: #18734
Change-Id: I149931c511020f9eb881e71f79d1fd6c647477e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7792
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>
Fix aspects of HaikuDepot's UI that do not scale when
the font size changes to accommodate a high resolution
monitor.
Change-Id: I105ebfe5a8f501cd7ffc22822438147ba07382a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7844
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
switch credits in AboutSystem from udis86 to zydis
Change-Id: I03a7965a272c50714df9726e53c7d4067d8f1925
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7850
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* for GCC2 build with a modern GCC as suggested by waddlesplash
* make the headers compatible with GCC2
Change-Id: Ice74eeddbe10bc8f9cf9ae90baa833a46bb3c676
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7848
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* udis86 isn't updated since 2014. New SIMD opcodes are missing.
Thus replaces udis86 with Zydis, which is actively developed and used in
Webkit, SpiderMonkey. It is under MIT license.
* encoder code is removed
Change-Id: Ieae7e829e186ce7d4a6df640c62561ad220858fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7847
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We can't call user_debug_image_deleted with the lock held, so clear
the list and remove all images before unlocking and looping again.
This also means we free() without the lock held, which should
reduce contention.
The callgrind information should contain a path to an ELF file,
not an identifier. We thus only add the identifer when we don't
have something that looks like a path (or is the commpage.)
This allows applications that analyze callgrind output to merge
images with the same ELF file.
The data section could theoretically be before the text section,
but it also may not exist and have a size of 0. The commpage
image is one such image with those qualities, and so we
would thus always find it as having a hit when encountering it
in the list.
And since data_size might be 0, just do < instead of <= and -1.
This massively fixes the profiler's output.
The profiler depends on this, and it's likely to invoke the scheduler
of its own accord anyway.
This logic could possibly be abstracted into a generic function, seeing
as it's the same across all architectures...
The "-k" argument (which never did anything before) is now inverted
compared to what it used to be, i.e. now specifying it will profile
kernel frames, too, whereas by default only user frames will be
sampled.
The infos[i] will only have B_EVENT_INVALID in the case where
select() returned an error and we set it ourselves; or for
wait_for_objects, it will now always be set as one of the select
flags, so we can't rely on it there.
Failing to deselect objects (or, in the case where we did receive
B_EVENT_INVALID, deselecting them again incorrectly) can cause
memory corruptions and use-after-frees.
Fixes at least one KDL inadvertently introduced after the previous
refactorings, but the double-deselect problems predate that commit.
In the preceding commit, I missed that "events" was cleared
inside the select loop, making a use later on useless.
Now we don't clear it in the loop, but wait till the end
to do so. (Considering we return without clearing it in
case of out-of-memory or other problems, this may not
even be necessary, but it at least preserves existing
behavior.)
This also corrects an oversight in pthread_join() that not all
potential error codes of wait_for_thread were accounted for
(in particular EDEADLK wasn't.)
This is a non-standard extension, but is present on both Linux
and FreeBSD, at least.
Change-Id: Ie96e7a261e863ab491bee30349360df7ff3d0e80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5099
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Adjust wait_for_objects/select/poll implementations to handle this
properly (use the original array's selected-events values, not
the select info's values, and ignore errors if events were reported.)
event_queue is not adjusted and will behave differently after this
change (specifically it will not allow such FDs to be added,
which matches behavior of epoll/kqueue elsewhere.)
Change-Id: Icea26efce894f00697afd29f3bf51b7e60e522ab
Put the extensions above the "Haiku thread API bridge",
fix their indentation, and make them standard instead of weak symbols.
(musl does not declare these functions as weak symbols, at least.)