I am trying to gather some information from the backend to use in combination with the IR in LLVM.
The problem is that I wrote a pass to collect the info as a MachineFunctionPass and now I want to use it in a FunctionPass, so I set the dependency using getAnalysisUsage. When I try to run the pass, it crashes due to maybe a dependency loop.
Is there a workaround this issue?
Thanks,
Related
I want to get RX/TX statistics like bytes or packets sent/received for DPDK enabled interfaces. Similar to data present in the /proc/net/dev file. How can I get this?
I tried the command
./dpdk-procinfo -- --stats
But I get the following error.
The command that I use for the primary application.
./tas --ip-addr=10.0.0.1/24 --shm-len=1073741824 --dpdk-extra="-w 01:00.1" --fp-cores-max=4
I get the following output on ldd
[EDIT] based on debug session with Ashwin, it is been found PRIMARY application is compiled DPDK-19.11 while procinfo is run with DPDK-17.11.4. Running with the right version for primary-secondary is working with l2fwd. Application has CFLAGS and LDFLAGS cleanup to be done. Suggested the same
Solution: always run dpdk-procinfo with the same version as primary.
I humbly request you to go through http://doc.dpdk.org/api/rte__ethdev_8h.html. There are API rte_eth_stats_get and rte_eth_get_xstats which does the job for you. These can be invoked in the primary and secondary application of DPDK.
But if you are looking for a ready-made solution please take a look into dpdk-procifno application. The binary for the target is present in the target folder/app while the source code is present in dpdk-root/app/procinfo.
quick way to test the same is by referring to https://doc.dpdk.org/guides-18.08/tools/proc_info.html. the sample command line can be ./dpdk-procinfo -- --stats and ./dpdk-procinfo -- --xstats.
[EDIT]
as per the comment, if primary is run with whitelist PCIe devices, please pass the same in dpdk-procinfo
I've built OpenWrt for x86 and I'm using QEMU to run it virtually.I'm trying to debug this system in real time. I need to see things like network traffic flowing etc.
I can attach gdb remotely and execute (mostly) step by step with break points. I really want trace points though. I don't want to pause execution and loose network flow. When I tried setting trace points using tstart, I see the message "Target does not support this command". I did a bit of reading of the gdb documentation and from what I can tell the gdb stub that runs to intercept normal execution in QEMU does not support trace points.
From here I started looking at other tools and ran across PANDA (https://github.com/panda-re/panda). As I understand PANDA will capture a complete system trace in a log and allow for replay. I think this tool is supposed to do what I need, but I cannot seem to replay the results. I see the logs, I just can't replay them.
Now, I'm a bit stuck on what other tools/options I might have to actually trace a running embedded system. Are there any good tools you can recommend? Or perhaps another method I've missed?
If you want to see the system calls and signals use strace.
Strace can also be used with running process and it can put the output in a log file if required.
In OpenWrt it is possible to build with ftrace. Ftrace has much of the functionality I required but not all.
To build with ftrace, the option for ftrace must be selected in the build menu. Additionally there are a variety of tracer options that must also be enabled.
The trace-cmd (ftrace) is located in menuconfig/Development
Tracing support is under menuconfig/Global build settings/Compile the kernel with tracing support and includes: Trace system calls, Trace process context switches and events, and Function tracer (Function graph tracer, Enable/disable function tracing dynamically, and Function profiler)
I'm also planning to build a custom GDB stub to do this a little bit better as I also want to see the data passed to the functions not just the function calls.
I has customize the DefaultTemplate and change the SyncWorkspace activity to TfGet activity.
Now I'm trying to queue a build with shelve but the build seem to ignore the shelve and ran the build without the shelve, I'v tried to queue the same build with the same shelve in the default template and everything is fine..
There is anyone that know what the problem?
Did you have to use TF get activity to get the sources. There are some obvious differences between the both SyncWorkspace and Tf get activity. Recommend you to use TF get source activity. Tess pass on my environment with below settings.
Each build process template has a parameter called SupportedReasons. This enum is normally set to all. Make sure you have this parameter in your customized templated and didn't change the value.
I'm adding some features I find useful to my GDB startup script. A few of the startup commands apply only to "live" targets, or have components that make sense only with live targets. I'd like to be able to test for the presence (or absence) of a core file, and skip or amend these commands as appropriate.
I looked around in the Python API, but couldn't find anything that tells me whether an inferior is a core file or a live program. I'm fine with a scripting solution that works in either GDB itself or in the Python GDB scripting interface.
It doesn't look like there is a way to do that.
I'd expect an attribute on gdb.Inferior, but there isn't one.
File a feature request in GDB bugzilla.
info proc status returns "unable to handle request" for core files, whereas for a live process it returns several lines, the first of which looks like: "process 1234".
You can run that command and compare its first output line against that string using the execute_output() function from here: https://github.com/crossbowerbt/GDB-Python-Utils/blob/master/gdb_utils.py
It is possible to set the delay time when executing a jenkins build?
Like when using p.ex:
http://host/jenkins/job/job_name/build?delay=100sec
But making it with a plugin. I dont know how to get this delay parameter and set it with another value.
Thanks a lot.
I think build parameters are stored as environment variables and if that's the case, then you should be able set them using some code like this:
build.getEnvironment(listener).put("delay", "250");
In your plugin, you would put this in the setUp method of a class that extends the BuildWrapper.