Hello, so I am logged into my Raspberry PI with VNC, this time this is kind of a nice option for using some of the profiling and tracing tools. Just makes it a little easier than the command line options that they have. If you don't want to use VNC, there are some downsides to VNC, it is kind of heavyweight, uses a lot of X window. Capabilities, and therefore you can see in my age top that there's X window activity, but on the other hand, when you're running real time applications. As long as you're running scared paper, they should take priority anyway, so what I'm going to do is run a program we looked at before. This are asked symptoms and we're going to see it, basically, uses quite a few actually Erast not harassed, SIM uses quite a few semaphores, an LOX and will see it basically start to. Peg the CPU, there we go, so I'm going to run a cyst Prof at the same time and I'll just kind of fight so you can see that we're using a lot of CPU. And the thing about locks is that or semaphores is that not only are we going to use a lot of CPU because we're actually prime number hunting. But we use a lot of kernel time when we are prime number hunting and there were done. So I'm going to stop because we have these system calls which are fairly expensive and so one of the mysteries we had was why is erast with LOX slower, even though it's threaded. And I think now you can, you can see why if we look at what's going on here, we see that, I'm going to see I guess I can resize this a little bit. You can see the percentage use, so for are asked it was 80% of the CPU over the time we profile and you can see the CPU trace up here in the loading tray. So we had all the cores loaded for some time there and harassed was using most of the CPU time and there was quite a bit of time spending in this threading code. Quite a bit of time spent in this, SIM post code and in kernel space, since impose and we can kind of see that in the time function. But now we can really see that here and if we were to compare that to just the simpler asked which we can go ahead and do real quick, why not? Let's run sysprep again, this gives us insight into what's going on with system profiling the entire platform, so now I'm just going to run Erast simp this is single threaded. And it's going to take the CPU as well, but not the is not using the locks 'cause it's single threaded, and in fact you can see it using 100% CPU there. It's probably done now 'cause it drop down, yep, so will hit stop and I could do this on the command line or in a script too. But I just wanted to do it interactively so you can see how it's working and look at that. It's using much less of these CPU an there's almost no kernel space usage, right? By comparison with threading in the locks you know some basic kernel functions for the main program, and that's it. So this product can really tell you when your system calls are getting expensive, so it's very useful in that regard, and I highly recommend it. You can use it command line, or you can use it interactively as I've done here, and now I'm going to show you. Colonel Shark with trace commands and same kind of thing, I'm just going to run the look at the scheduler. So I'm going to have a terrible memory for commands, but especially ones I don't use a lot, so trace command. One of the things I can do is if I just remember that if I look at the manpage I can look that I can do trace command staff and if I remember if I enter Trace command line if I get. All the functions I could do, so there's a lot of the things I can trace in the kernel, so I might want to grab just for scheduling events and then I get fewer and. If I look through this, I might finally realize well what I really want is I want to I want to trace just the context switch events so there's kids, which I can do. Trace command record dashie Sketch, which I can do, trace command record all if I want to see everything that's going on the kernel. I don't really recommend that, but now I'm tracing and I could run things like I could go ahead and run my. Erast just for fun, and that would create more loading, Now I'd have everything that's going on in the kernel. Plus this Aristophanes threaded program with all the locks and so forth and that might make it more interesting, or, that's what I want to profile. But what I'm seeing is really well, I'm sorry trace I'm going to get a trace of everything that's going on the kernel as well as my program is causing to be executed. The kernel on my behalf, so whenever I'm, happy with that race, I can just hit control C and again I can script this rather than doing interactively. That would probably be better for serious testing, but I'm just trying to show you how it's used so there's a trace data that's created. It should be the latest one there is September 15th and you can see I'm working pretty late tonight, it just past midnight, so if I just type in kernel shark. It's going to use trace debt, trace data by default in the same directory and Apple Pop a histogram style trace. That's remarkably similar to win, view or system viewer for all the kernel events in Linux, well for the context, which is an actually, that's amazing, so I caught. Did this trace without my harassed running and there wasn't much going on? You can see the Rast really does cause quite a few kernel events to occur and I can do things like I can zoom in here so I just make cross. Here's a lot like the Wind view or system viewer trace an you know you can see there's a lot of loading on CPU one. There I can go over here there's a lot of loading on all four CPUs wildly, that's crazy, the main thing trouble I have with actually. Purple striker is just like it's so busy, so detailed, it's just, yeah, you really got a drill in to see what's going on, but you can get that info if you want it. You know so you can go in or out and you can look at a trace down here as well, so it's kind of really amazing. It's kind of really useful, but the thing is, it's showing you the schedule and switches so that could be really useful, I normally do this in Linux with syslog in just. Then plot my schedule switches, but this would be a way to automatically do that much like a win view. So that's that's all I wanted to show you where those basic tools they can take a long time to really master and become an expert on and. So I don't try to teach them exhaustively, but to raise awareness that they're there and I just would recommend using them and gain experience with them. But realizing that you can probably get by with some pretty basic tools, IG prop Chico, syslog a basic single step to ****** like Namibia or something like that, but these in each top. But these a sophisticated tools could be really useful if you have a much more complicated project, so thank you very much.