Introduce and use Verifier::visitDIType (#189067)
This adds a new method Verifier::visitDIType, and then changes method
for subclasses of DIType to call it. The new method just dispatches to
DIScope and adds a file/line check inspired by
Verifier::visitDISubprogram.
[SampleProfile] Fix FuncMappings key mismatch for renamed functions in stale profile matching (#187899)
Fix a bug where `distributeIRToProfileLocationMap` fails to find
location mappings from IR to profile for renamed functions because
`FuncMappings` is indexed by the IR function name while
`distributeIRToProfileLocationMap` looks up by the profile function
name. Fixed by making `FuncMappings` to use profile function name as
key.
[lldb][Utility] Remove address size from Stream class (NFC) (#190375)
It violates abstraction. Luckily, it was used only in two places, see
DumpDataExtractor.cpp and CommandObjectMemory.cpp.
devel/sdl3: enable UDEV for KMSDRM and by default
As reported in 294156, UDEV must be enabled along with KMSDRM.
Enable it by default as well in consistence with upstream setting.
PR: 294156
Reported by: quentin.thebault at defenso.fr
devel/sdl{20,3}: fix fcitx dependency
- Switch from lib to run-dependency, as only dbus service from fcitx is in fact used by sdl
- Update from deprecated chinese/fcitx to textproc/fcitx5
PR: 293861
Reported by: jcfyecrayz at liamekaens.com
[clang-doc] Simplify parsing and reading bitcode blocks
Much of the logic int he readBlock implementation is boilerplate, and is
repeated for each implementation/specialization. This will become much
worse as we introduce new custom block reading logic as we migrate
towards arena allocation. In preparation for that, we're introducing the
change in logic now, which should make later refactoring much more
straightforward.
[clang-doc] Move non-arena allocated types off the OwnedPtr alias
Some types should not be using this alias, which was over applied to
APIs that wont participate in arena style allocation. This patch
restores them to their correct spelling.
[clang-doc] Merge data into persistent memory
We have a need for persistent memory for the final info. Since each
group processes a single USR at a time, every USR is only ever processed by
a single thread from the thread pool. This means that we can keep per
thread persistent storage for all the info. There is significant
duplicated data between all the serialized records, so we can just merge
the final/unique items into the persistent arena, and clear out the
scratch/transient arena as we process each record in the bitcode.
The patch adds some APIs to help with managing the data, merging, and
allocation of data in the correct arena. It also safely merges and deep
copies data from the transient arenas into persistent storage that is
never reset until the program completes.
This patch reduces memory by another % over the previous patches,
bringing the total savings over the baseline to 57%. Runtime performance
and benchmarks stay mostly flat with modest improvements.
[31 lines not shown]
[clang-doc] Support deep copy between arenas for merging
Upcoming changes to the merge step will necessitate that we clear the
transient arenas and merge new items into the persistent arena. However
there are some challenges with that, as the existing types typically
don't want to be copied. We introduce some new APIs to simplify that
task and ensure we don't accidentally leak memory.
On the performance front, we reclaim about 2% of the overhead, bringing
the cumulative overhead from the series of patches down to about 7% over
the baseline.
| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 1014.5s | 991.5s | +7.7% | -2.3% |
| Memory | 86.0G | 39.9G | 40.0G | -53.4% | +0.3% |
| Benchmark | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
[28 lines not shown]
[clang-doc] Move Info types into arenas
Info types used to own significant chunks of data. As we move these into
local arenas, these types must be trivially destructible, to avoid
leaking resources when the arena is reset. Unfortunaly, there isn't a
good way to transition all the data types one at a time, since most of
them are tied together in some way. Further, as they're now allocated in
the arenas, they often cannot be treated the same way, and even the
aliases and interfaces put in pLace to simplify the transition cannot
cover the full range of changes required.
We also use some SFINAE tricks to avoid adding boilerplate for helper
APIs, we'd otherwise ahve to support
Though it introduces some additional churn, we also try to keep tests
from using arena allocation as much as possible, since this is not
required to test the implementation of the library. As much of the test
code needed to be rewritten anyway, we take the opportunity to
transition now.
[41 lines not shown]
[clang-doc] Consolidate merging logic
As we migrate things in the arena, this logic may get more complex.
Factoring it out now, will give clear extension points to make this
easier to manage.
[clang-doc] Enforce arena allocated types are trivially destructible
We can enforce at compile-time that the types we want to place in the
arenas are always safe to allocate there.
[clang-doc] Make CommentInfo arena allocated
This patch move the CommentInfo type into the arena. It updates block
handling to collect child info types and serialize the array in one
shot.
We also clean up the test code to avoid using the arenas in the tests.
This has the upside of making the test more hermetic, and avoids churn
in the related code as the allocation API interfaces evolve.
Performance and memory usage regress slightly. This is somewhat expected
as we do not yet aggressively release short term memory during merge
operations. Future patches will reclaim this overhead.
| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 998.5s | 1010.5s | +9.8% | +1.2% |
| Memory | 86.0G | 43.8G | 47.8G | -44.4% | +9.2% |
[26 lines not shown]
NAS-140530 / 26.0.0-BETA.2 / Auto-expand builtin ACL templates with groups (by anodos325) (#18642)
This commit changes the default behavior of our ACL templates to
auto-expand to include users / admins. It restores behavior from earlier
truenas versions (where UI was auto-expanding stored ACL templates with
these accounts). The UI behavior was reverted back due to problems
raised by automation team. In this case I'm reintroducing due to desire
to make ACL templates easier for our user base (since most of them just
want their local / AD users to be able to access data).
Original PR: https://github.com/truenas/middleware/pull/18630
---------
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
[lldb] Fix formatting in ModuleList (NFC) (#190382)
I had auto-merge enabled in #189444 and since the formatter is
non-blocking it got merged despite the issue. Given I'm already here, I
just formatted the whole file.
NAS-140540 / 26.0.0-BETA.2 / fix R60 enclosure mapping (by yocalebo) (#18645)
We have another internal R60 that doesn't show any enclosures at all.
The reason why is that its system product name (in DMI table) is flashed
with the `-SC` suffix....
This was supposed to have been accounted for in
https://github.com/truenas/middleware/commit/5adab5d81bd8e2996828b7b32193c7a87548ff1d
and we even tested on another internal R60 platform and IT WORKED.
The issue is that the R60 that was tested against is NOT flashed with
any suffixes.... which revealed the fact that the nvme mapping code did
not follow same logic and the R60 is an all NVMe system. To remedy the
situation add a utility function that unifies the model transformation
into 1 place so, ideally, this won't be as easy to do in the future....
Original PR: https://github.com/truenas/middleware/pull/18641
Co-authored-by: caleb <yocalebo at gmail.com>
NAS-140540 / 26.0.0-BETA.1 / fix R60 enclosure mapping (by yocalebo) (#18644)
We have another internal R60 that doesn't show any enclosures at all.
The reason why is that its system product name (in DMI table) is flashed
with the `-SC` suffix....
This was supposed to have been accounted for in
https://github.com/truenas/middleware/commit/5adab5d81bd8e2996828b7b32193c7a87548ff1d
and we even tested on another internal R60 platform and IT WORKED.
The issue is that the R60 that was tested against is NOT flashed with
any suffixes.... which revealed the fact that the nvme mapping code did
not follow same logic and the R60 is an all NVMe system. To remedy the
situation add a utility function that unifies the model transformation
into 1 place so, ideally, this won't be as easy to do in the future....
Original PR: https://github.com/truenas/middleware/pull/18641
Co-authored-by: caleb <yocalebo at gmail.com>
NAS-140540 / 25.10.2.2 / fix R60 enclosure mapping (by yocalebo) (#18643)
We have another internal R60 that doesn't show any enclosures at all.
The reason why is that its system product name (in DMI table) is flashed
with the `-SC` suffix....
This was supposed to have been accounted for in
https://github.com/truenas/middleware/commit/5adab5d81bd8e2996828b7b32193c7a87548ff1d
and we even tested on another internal R60 platform and IT WORKED.
The issue is that the R60 that was tested against is NOT flashed with
any suffixes.... which revealed the fact that the nvme mapping code did
not follow same logic and the R60 is an all NVMe system. To remedy the
situation add a utility function that unifies the model transformation
into 1 place so, ideally, this won't be as easy to do in the future....
Original PR: https://github.com/truenas/middleware/pull/18641
Co-authored-by: caleb <yocalebo at gmail.com>
NAS-140540 / 27.0.0-BETA.1 / fix R60 enclosure mapping (#18641)
We have another internal R60 that doesn't show any enclosures at all.
The reason why is that its system product name (in DMI table) is flashed
with the `-SC` suffix....
This was supposed to have been accounted for in
https://github.com/truenas/middleware/commit/5adab5d81bd8e2996828b7b32193c7a87548ff1d
and we even tested on another internal R60 platform and IT WORKED.
The issue is that the R60 that was tested against is NOT flashed with
any suffixes.... which revealed the fact that the nvme mapping code did
not follow same logic and the R60 is an all NVMe system. To remedy the
situation add a utility function that unifies the model transformation
into 1 place so, ideally, this won't be as easy to do in the future....
[clang-tidy] Fix readability-identifier-naming for C++17 structured bindings (#189500)
`BindingDecl` nodes, i.e. the individual names in a structured binding,
were not handled in `IdentifierNamingCheck::findStyleKind()`, causing
them to fall through to the Default style or be silently ignored.
This led to incorrect renames, e.g. applying member variable conventions
to local bindings.
---------
Signed-off-by: Björn Svensson <bjorn.a.svensson at est.tech>
Auto-expand builtin ACL templates with groups
This commit changes the default behavior of our ACL templates to
auto-expand to include users / admins. It restores behavior from
earlier truenas versions (where UI was auto-expanding stored
ACL templates with these accounts). The UI behavior was reverted
back due to problems raised by automation team. In this case I'm
reintroducing due to desire to make ACL templates easier for
our user base (since most of them just want their local / AD
users to be able to access data).
(cherry picked from commit 08ec693d7f40a47052801a6d78bb7a53e324b8fd)