[lldb] Add MockMemory class for dwarf expression testing (#168467)
This change unifies the way that we specify mocked memory to make it
easy to control the process and target memory contents for unit tests.
We add a MockMemory class that can be used in dwarf expression testing
to specify the output of the `ReadMemory` function.
The MockMemory class is built on a map that maps a `(address, size)`
pair to a vector of bytes that is `size` bytes long and contains the
memory contents for that `address`.
The MockProcessWithMemRead and MockTarget classes are updated to use the
new MockMemory interface. The MockProcessWithMemRead class was renamed
to MockProcess and the old MockProcess was deleted. The old MockProcess had
and ReadMemory implementation that returned the value `i & 0xff` for reading the
address `i` and was easily be replaced with the MockMemory object.
The CreateTestContext function now takes optional values for process memory and
target memory and uses those to create the mock objects.
Add FCP_SHARE SMB share purpose
This commit adds a new SMB share purpose explicilty for Final Cut
Pro per internal request as a response to a certain user demographic
that expressed displeasure in us removing the ability to override
the vfs objects (which would break our SMB server configuration
in various subtle ways). The share type does not provide novel
capabilities, but does make it slightly easier to configure an
SMB share per the Apple support document provided at
https://support.apple.com/en-ca/101919
This support document can be distilled to the following:
* vfs_fruit is required (this is the global setting in the SMB server
configuration).
The Apple support document also status that vfs_catia is required,
but the specified configuration in the document is effectively a
[6 lines not shown]
[ARM] Restore hasSideEffects flag on t2WhileLoopSetup (#168948)
ARM relies on deprecated TableGen behavior of guessing instruction
properties from patterns (`def ARM : Target` doesn't have
`guessInstructionProperties` set to false).
Before #168209, TableGen conservatively guessed that `t2WhileLoopSetup`
has side effects because the instruction wasn't matched by any pattern.
After the patch, TableGen guesses it has no side effects because the
added pattern uses only `arm_wlssetup` node, which has no side effects.
Add `SDNPSideEffect` to the node so that TableGen guesses the property
right, and also `hasSideEffects = 1` to the instruction in case ARM ever
sets `guessInstructionProperties` to false.
sound: Merge chn_intr() with chn_intr_locked()
There is no scenario where chn_intr() is called with the channel lock
already held.
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53854
sound: Merge PCM_ALIVE() with PCM_REGISTERED()
PCM_ALIVE() is used only in pcm_unregister(), but it does not hurt to
use PCM_REGISTERED(), which uses PCM_ALIVE() internally. In fact, it's
more robust this way.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sound: Retire snd_mtx* wrappers
Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_* functions directly instead of the
snd_mtx* wrappers.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53855
sound: Simplify logic in dsp_io_ops()
Use CHN_LOCK()/CHN_UNLOCK() directly, instead of
dsp_lock_chans()/dsp_unlock_chans(). These functions are useful when we
want to potentially lock both channels. Here we know which channel we
are locking, so we can just lock it directly. This way we get rid of the
prio variable as well.
Related to runpid again, there is no reason to assign it when
CHN_F_RUNNING is not set. channel->pid (as well as channel->comm) is
always assigned in dsp_chn_alloc().
Get rid of runpid. I do not see how we can end up with channel->pid
(td->td_proc->p_pid) not matching buf->uio_td->td_proc->p_pid.
Also improve errno values.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[2 lines not shown]
dmesg.8: Index kern.msgbuf_show_timestamp
This is the only place this important debugging tunable is documented.
Mark it up with the Va macro according to style.mdoc(5) so that people
can find it via `apropos Va=kern.msg`, the standard syntax to search
the FreeBSD manual for sysctls and tunables.
Fixes: 6910fee62e77 (dmesg: Document kern.msgbuf_show_timestamp)
(cherry picked from commit e13664f6a44b4970ea5e8378b8e1a4879fa5d5a0)
dmesg.8: Index kern.msgbuf_show_timestamp
This is the only place this important debugging tunable is documented.
Mark it up with the Va macro according to style.mdoc(5) so that people
can find it via `apropos Va=kern.msg`, the standard syntax to search
the FreeBSD manual for sysctls and tunables.
Fixes: 6910fee62e77 (dmesg: Document kern.msgbuf_show_timestamp)
(cherry picked from commit e13664f6a44b4970ea5e8378b8e1a4879fa5d5a0)
dmesg.8: Index kern.msgbuf_show_timestamp
This is the only place this important debugging tunable is documented.
Mark it up with the Va macro according to style.mdoc(5) so that people
can find it via `apropos Va=kern.msg`, the standard syntax to search
the FreeBSD manual for sysctls and tunables.
Fixes: 6910fee62e77 (dmesg: Document kern.msgbuf_show_timestamp)
X86: Stop overriding getRegClass
This function should not be virtual; making this virtual was
an AMDGPU hack that should be removed not spread to other
backends.
This does not need to be overridden to reserve registers. The
register reservation mechanism is orthogonal to to the register
class constraints of the instruction, this should be reporting
the underlying instruction constraint. The registers are separately
reserved, so they will be removed from the allocation order anyway.
If the actual class needs to change based on the subtarget,
it should probably generalize the LookupPtrRegClass mechanism.
This was added by #70958. The new tests there for the class are
probably not useful anymore. These instead should compile to the
end and try to stress the allocation behavior.