only one tool. The code is copied mostly as-is, and the functionality is
available via the "analyze" command.
Eg:
tprof monitor -e llc-misses:k -o myfile.out sleep 20
tprof analyze < myfile.out
Will move soon, I don't like the reading via stdin.
Rewrite the Intel backend to use the generic PMC interface, which is
available on all Intel CPUs. Synchronize the AMD backend with the new
interface.
The kernel identifies the PMC interface, and gives its id to userland.
Userland then queries the events itself (via cpuid etc). These events
depend on the PMC interface.
The tprof utility is rewritten to allow the user to choose which event
to count (which was not possible until now, the event was hardcoded in
the backend). The command line format is based on usr.bin/pmc, eg:
tprof -e llc-misses:k -o output sleep 20
The man page is updated too, but the arguments will likely change soon
anyway so it doesn't matter a lot.
The tprof utility has three tables:
Intel Architectural Version 1
Intel Skylake/Kabylake
AMD Family 10h
A CPU can support a combination of tables. For example Kabylake has
Intel-Architectural-Version-1 and its own Intel-Kabylake table.
For now the Intel Skylake/Kabylake table contains only one event, just
to demonstrate that the combination of tables works. Tested on an
Intel Core i5 Kabylake.
The code for AMD Family 10h is taken from the code I had written for
usr.bin/pmc. I haven't tested it yet, but it's the same as pmc(1), so
I guess it works as-is.
The whole thing is written in such a way that (I think) it is not
complicated to add more CPU models, and more architectures (other than
x86).
In the get_and_unpack_sets() function there is accessed the
set_status[SET_GROUP_END] element in the array. The array is allocated on
the stack with SET_GROUP_END elements. This means that it is 1 element too
short.
This has been reported with MKSANITIZER=yes with Address Sanitizer.
Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.
Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow
and 2th byte NOP.
Add a comment explaining the check.
Detected with MKSANITIZER and ASan.
The path variable is assigned with an allocation on the heap with
strdup(3). Later this pointer is changed with strsep(3) and this caused
invalid free(3).
Store the original pointer in a new helper variable opath and pass it to
free(3). With this change, the problem is going away.
Detected with MKSANITIZER=yes with AddressSanitizer.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.
in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
- dtrace FBT probes can now be placed in kernel modules.
- ZFS now supports mmap().
- Remove the old, not-expressive-enough interrupt flags, and replace them
with a new set of interrupt-specific flags that can express a wide
variety of interrupt configurations (pos, neg, and double-edge, high
and low level).
- Remove old, unused gpio_pin_ctl_intr() and gpio_pin_irqen(), and
replace them with gpio_intr_establish(), gpio_intr_disestablish(),
and gpio_intr_str(). Corresponding fields in the gpio_chipset_tag
are also added for back-end controllers, which now handle the actual
dispatch of GPIO interrupts in order to properly support level-triggered
interrupts as well as interoperate properly with FDT-registered
interrupts.
Piggy-back on the 8.99.18 version bump.
Inspired by initial work from Brad Spencer.
PR kern/51676
Don't call pm_lvm_find() unless have_lvm
pm_lvm_find() assumes that data structs (lvms) has been allocated
for it to use, which doesn't happen if !have_lvm
This avoids a sysinst core dump when the lvm command is not installed
(such as when installing from the embedded RAM root filesys in an
INSTALL kernel.)
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
This is done by having a secondary timer against rainfo so we
can delay unicasting by the required randomised amount of time
without affecting the unsolicited RA timer.
- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
can no longer rely on matching an exact name like "(INSTALL32_IP3x)".
Strip the trailing ) from the version strings checked so sysinst will
install the correct bootloader and kernel again.
this change doesn't decode perfectly. Tested with Gemini Lake. It has
two L2 Shared TLB. One is 4MB and another is 2MB/4MB but former isn't
printed yet:
cpu0: ITLB 1 4KB entries 48-way
cpu0: DTLB 1 4KB entries 32-way
cpu0: L2 STLB 8 4MB entries 4-way
Need some rework for struct x86_cache_info.
- Use aprint_error_dev() for error output.
mail's execute() needs a volatile for setjmp().
telnet has a missing {} issue.
isdnd's print_config() has a missing/wrong {} issue, and
its p_q931bc() has inconsistent indentation (but not any
actual problem.)
map-mbone's accept_neighbors2() compares a vs. a instead
of a vs. b.
sysinst's pm_cgd_check() has missing {} issue.
timed's main() has missing {} issue.
sparc:
- move enum vactype and struct cacheinfo into cpu.h
- move the cache flags from cpuinfo.flags into CACHEINFO.c_flags
(this allows the new cache_printf_backend() to see them.)
remove unused CPUFLG_CACHEIOMMUTABLES and CPUFLG_CACHEDVMA.
- align xmpsg to 64 bytes
- move cache_print() into cache_print.h so it can be shared with
cpuctl. it only depends upon a working printf().
- if found, store the CPU node's "name" into cpu_longname. this
changes the default output to show the local CPU not the
generic CPU family. eg:
cpu0 at mainbus0: mid 8: Ross,RT625 @ 90 MHz, on-chip FPU
vs the generic "RT620/625" previously shown.
- for each CPU export these things:
- name
- fpuname
- mid
- cloc
- freq
- psr impl and version
- mmu impl, version, and number of contexts
- cacheinfo structure (which changed for the first time ever
with this commit.)
sparc64:
- add a minimal "cacheinfo" structure to export the i/d/e-cache
size and linesize.
- store %ver, cpu node "name" and cacheinfo in cpu_info.
- set cpu_info ver, name and cacheinfo in cpu_attach(), and
export them via sysctl, as well as CPU ID and clock freq
cpuctl:
- add identifycpu_bind() that returns false on !x86 as their
identify routines do not need to run on a particular CPU to
obtain its information, and use it to avoid trying to set
affinity when not needed.
- add sparc and sparc64 cpu identify support using the newly
exported values.
makefs(8) emulates UFS2 in performing lazy initialization of inode
blocks when allocating and writing inodes. However, it only ever
initializes one inode block at a time, which may be insufficient.
If so, a later initialization may clobber an inode, resulting in
an inconsistent filesystem.
I committed a minimal fix for the problem to FreeBSD:
https://svnweb.freebsd.org/changeset/base/326912
If we want to add or remove arguments from the callback functions, it requires
changing the callback interface all over the place. By letting the callback simply
expect a single struct argument, it would clean things up a bit.
ok christos
alignment issues on some platforms (e.g. Sparc64)
So, Use a temporary variable to avoid the cast.
Thanks to Martin@ for noticing the issue and also suggesting the issue.
Fixes PR bin/52678
group fails. This happens with empty vlan interfaces
- make syscalls checks against -1
- fix errors to print %s: instead of <%s>
XXX: if_vlan is the only pseudo interface in net/ that returns such an
error..
be a leftover line saying "Status: Finished" at the top of the next
screen, along with some random punctuation in the left and right
margins. Inspired by ../landisk/md.c 1.3.
An incoming remote message may not necessarily have a hostname
between the timestamp and the message. The the source of the remote
sender is already looked up so use that hostname/IP address rather
than the local hostname.
XXX: pullup-8
XXX: pullup-7
XXX: pullup-6
- the header is only 1 line not 2, account for this when calculating
when to display the next header.
- when ndrives > 1, don't display the header every time, but only when
the previous one disappears.
now i don't feel the need to run "iostat -x wd0 1 & iostat -c wd1 1"
to get less repeated header output on my display.
directory hierarchy stops if the same hash value occurs in
directory and leaf.
Fix the issue that
"./usr/share/locale/pl/LC_MESSAGES/gettext-tools.mo" isn't included
in sets file in the case of MKUNPRIVED=no.
all of sub entries in HEST correctly.
- Print a SpaceID number for unknown ID in acpi_print_gas().
- Use PRINTFLAG() in acpi_print_hest_notify().
- Use %u instead of %d for unsgined values in acpi_print_hest_generic().
- Don't print FADT_RESET_REG if FADT version is 1.
- Print FADT ArmBootFlags, MinorRevision, SleepControl, SleepStatus and
HypervisorId.
- Print "{}" even if any flags aren't set.
- fixes CVE-2015-7236
- adds -h hostip to bind, -6 for only ipv6 access, -a for abort gracefully
- documents -w (warmstart)
XXX: should fix warmstart file to go to /var/run instead of /tmp
/usr/mdec/sbmips/ and document them in installboot(8) even though
it isn't really ported yet. also build the SBMIPS kernels.
unfortunately, sbmips has been broken since mips64 merge, but the
fix can happen in the evbmips version, which we might merge into
the older trees anyway.
XXX: releng can turn off sbmips* builds now for -current.
Fix is a combination of FreeBSD fix and submitted patch.
[From the FreeBSD change]
The timed protocol is not implemented in a compatible way by all
vendors; the size of the tsp_name field is OS-dependent. 4.3BSD
used a 32-byte field, FreeBSD uses MAXHOSTNAMELEN and RedHat
apparently uses a 64-byte field. As a result, sanity checking code
added a few months ago to detect short packets will fail when
interoperating with one of these other vendors.
Change the short packet detection code to expect a minimum packet
size corresponding to the 4.3BSD implementation, which should be
a safe minimum size.
Currently It will only load 1 firmware image for rpi3.
To use change to the directory containing the firmware BCM4340A1.hcd.
Then issue: btattach -FPi 115200 bcm43xx /dev/ttydevice 921600.
Then you can use the bluetooth device btfive0.
This enables the embedded bluetooth controller on rpi3.
It typically uses a non-NetBSD bootloader (PMON, u-boot...) and those
don't differentiate from v1 from v2 - both are unsupported and it requires
a separate boot partition.
- Dump TCG ACPI spec table (TCPA) more.
- Dump DMA Remapping Reporting table (DMAR).
- Consistently cast ACPICA 64-bit integer types when we print them.
- Display the 'Flags' field in the HPET Description Table.
- Do not crash when RSDT/XSDT contains an empty entry.
- Print 64-bit addresses clearly with leading zeros to avoid confusions.
- Create temp file safely.
- Add missing flags into FADT.
- Print some new ACPI 5.1 MADT entries.
- Use __arraycount().
- Warn and exit loop on invalid subtable length.
- Fix the type used to hold the value returned from getopt. On arm64 char is
unsigned so will never be -1.
- Add a proper description paragraph before launching into describing the
options. More closely follow format of the traceroute(8) man page.
- Improve the wording for some option descriptions.
- Add description what what is printed and define what the possible
annotations mean.
Using the custom tokenizer means one cannot interactively query the database
through the SQLite shell, thus thwarting the purpose of the debug build option.
Thanks to leot@ for reporting it.
(While there change the debug macro from DEBUG to APROPOS_DEBUG)
be a leftover line saying "Status: Finished" at the top of subsequent
screens, and the message "Hit enter to continue" will be redrawn after
the set selection is complete, which confuses literal-minded robotic
users such as anita.