Can the Jetson NX use the perf tools (except perf in Linux) to check my code cache misses? - memcached

At first, Linux for Tegra doesn't support perf tool in Jetson NX, and I have tried using its JP-5.0.1 Driver Package Sources ,but it's still not working...
So maybe there are other tools that can replace the linux perf tool to check the cache missesenter image description here?
enter image description here

Related

v4l2loopback doesn't create the /dev/video/ files

im trying to make v4l2loopback work on my desktop PC (no hardware camera) with mint 19.3, kernel 5.4.0-42-generic x86_64.
I followed the official instructions and compiled from git the v4l2loopback module and everything seem to run correctly, as no error prompted while running the instructions, but when i do ll /dev/v* there's no /dev/videoN entry.
I also tried with the flags exclusive_caps=1 and devices=2 but to no avail.
Any idea what i might be missing or doing wrong?
you need to load the module (e.g. using modprobe) before you can use it.
see also https://github.com/umlaeute/v4l2loopback#run

qemu-sparc vs qemu-system-sparc

I installed CentOS 7.6 then installed all things QEMU on my machine. I have a SPARC image I need to bringing up in a VM. I've been using qemu-system-sparc.
$ qemu-system-sparc -m 256 -hda solaris_v2-qemu_v2.2.0.disk -nographic -bios ./openbios-sparc32
This is on a box on which I have Fedora-30 installed.
Can I use qemu-sparc to bring up my Solaris image: solaris_v2-qemu_v2.2.0.disk ?
If so, how?
BTW, qemu-sparc come with (on CentOS 7.6):
$ sudo yum install qemu*
PS> I've tried to install qemu-system-sparc on my CentOS box but ended up in a never-ending whack-a-mole game of dependencies.
After a great deal of web searches, I found this:
QEMU as an userspace emulator
QEMU usually comes in two flavors: qemu-system-* are system emulators
(able to run entire operating systems as seen in the previous
section), while qemu-* are userspace emulators (only able to run
userspace applications).
QEMU as an userspace emulator is thus able to directly execute a SPARC
application, by emulating the syscalls that the application requests.
Among the greatest features of this approach are:
The output of application is directly displayed in the terminal,
Arguments to applications are directly given through the command line,
QEMU returns the return code of applications, etc. QEMU really just
acts as a wrapper around the application, as time or nice do.
The only complicated thing you have to do in this approach is to
compile a cross-toolchain for SPARC, so SPARC programs can be compiled
on the host computer. Such a cross-toolchain can be generated by using
the fabulous crosstool-ng.
So the answer appears to be: no, you CANNOT use qemu-sparc to run your image in a VM.
You need the qemu-system-sparc, wich will "emulate" a sparc system.
qemu-sparc will only emulate the CPU and syscalls, thus a SPARC compiled program (that you can extract from your disk image if needed) will run on non-sparc hosts, while most syscalls be "translated" by qemu into your host syscalls, thus a SPARC program can run on said host. file io, kernel stuff, it mostly get translated and run on your host. Handy for debugging or reverse engineering.
Try:
yum install qemu-kvm
The dependencies are required ofcourse. Not very usefull in your case but you could also compile qemu yourself, maybe the dependencies overlap:
git glib2-devel libfdt-devel pixman-devel zlib-devel

Where can I find what drivers built in my yocto project Linux kernel image?

I'm using Yocto project to build a linux kernel image following these steps:
https://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d27Som1EKMainPage
For some reasons I just want to reduce my Image size so I can flash it on QSPI 8 Mega octet memory. I have tried to reduce the size of my rootFS, I have removed some packages that I found in .manifest file and some Distro features. But I did not find how can I modify the kernel size which size is fixed ( 4.2 Mega octet ).
I think that when I can remove some drivers that I don't need the kernel size will be reduced.
I just want to know how can I find what drivers are built in my image and where can I find them ? and later how can I delete the ones that I don't need ?
Thank you.
if you check the .config file that was generated for your BSP, it will show what drivers (and other things) were built into your kernel (check for the 'y' on all the options).
Such file should be somewhere in:
tmp/work//linux-yocto//linux-*-build/.config
Sorry that I can't give you the exact location, but it literally depends on what BSP/MACHINE you are building for.
Also, if you want to modify such configuration, you can call:
$ bitbake -c menuconfig virtual/kernel
that will bring up the menuconfig ncurses interface, in which you can not only see what is installed but also modify what you need.

How to run yocto developed raspberry pi image in qemu?

I'm compiling an image for raspberry-pi in yocto.How can i develop the same image to run in qemu.?
I included meta-raspberrypi in poky(sumo branch) along with its dependencies(meta-openembedded).I don't want to take the image,flash in SD-card and run in the hardware every time for simple tweaks.
MACHINE ??= "raspberrypi2"
This is what I have included in local.conf.
So how to run my image in qemu to check the changes are applied.What should I include in local.conf to do this.
The answer above was on the right track but chose the wrong machine.
In order to run the image built using the meta-raspberrypi package you need to
comment out the raspberrypi2 machine and set the machine to qemuarm. The reason is
the processor on the raspi2 is a 32bit arm chip either a Broadcom 2836,or 2837 depending on the version of raspi2 you have. If you have a raspi1 B then likely a Broadcom 2835. You can look up the hardware here (raspi-projects) .
In your local.conf file change the lines to match those below .
#MACHINE ??= "raspberrypi2"
MACHINE ??= "qemuarm"
Build the image with
$ bitbake core-image-base
# or
$ bitbake rpi-basic-imag # deprecated
Then you will have a qemu image that can be run with
$ runqemu qemuarm
I have followed there steps myself and created the image I want, and am in the process of developing the system I need for a project. Hope this helps with others to move forward with similar goals.
Try MACHINE = "qemux86-64", then bitbake your image, then use the runqemu script.

Integration testing (preferably TravisCI) in a Gentoo Linux enviornment

I would like to benefit from the excellent package management capabilities and neuro/scientific support of Gentoo Linux when I am setting up continuous integration (CI) testing for my software (e.g. SAMRI).
Sadly, my favorite platform, TravisCI, seems to offer Ubuntu, Ubuntu, and MacOS environments only. I would like to know how to best (i.e. with minimal overhead and delay) set up a Gentoo Linux environment on TravisCI (or if need be, on another CI platform).
I have tried using the Gentoo Prefix bootstrap script, however:
simply calling it in - yes "" | ./bootstrap-prefix.ch will overflow the 4MB log limit
redirecting it to a file - yes "" | ./bootstrap-prefix.sh >> prefix_log.txt will cause the job to time out
I can't figure out how to increase the time out for such a command. -
travis_wait 60 |& yes "" | ./bootstrap-prefix.sh >> prefix_log.txt times out after 10 minutes.
In excess of all these issues, I feel bootstrapping an entire Gentoo install from scratch is a waste of time and resources. I am thinking maybe this can be more elegantly addressed by using one of the Gentoo OpenStack images - or something else?
If you want to test on Gentoo, I suggest using Docker (https://docs.travis-ci.com/user/docker), pull down a small Gentoo image (e.g., https://hub.docker.com/r/gentoo/stage3-amd64/) and run your tests on that image.