Medijski sadržaj
- Tweetovi
- Tweetovi i odgovori
- Medijski sadržaj, trenutna stranica.
-
Heterogeneous multi-core support is coming to Real Time For the Masses (RTFM), the embedded concurrency framework! https://github.com/japaric/cortex-m-rtfm/pull/205 … Pics are examples of message passing between the ARM Cortex-M4F and ARM Cortex-M0+ cores on an LPC541xx micro But first ... (1/2)pic.twitter.com/WNSMlrLjoZ
Prikaži ovu nit -
Real Time for The Masses (RTFM) running on ... (x86_64) Linux (?!) https://github.com/japaric/linux-rtfm … Deadlock-free memory sharing and message passing both work and apps run on a single CPU I have no idea what you would use this for, though. Maybe some soft real time embedded Linux app?pic.twitter.com/kWNWdGcuQz
Prikaži ovu nit -
Morning Rustaceans. Today I'm thrilled to announce the beta release of my latest crate: https://crates.io/crates/ufmt μfmt: a (6-40x) smaller, (2-9x) faster and panic-free alternative to core::fmt! Features: uwrite!, #[derive(uDebug)], debug_struct, no trait objects, no recursion.pic.twitter.com/5RWOBNdKWY
-
Bonus image: Did you know that `core::fmt` can panic? If your panic handler uses formatting then you'll end up with a call cycle in your program.pic.twitter.com/k7Y8awS2Q1
Prikaži ovu nit -
Last new feature: the cycles in the call graph are now highlighted using "clusters". Now the cycles that prevent computing the worst case stack usage are easier to spot so you can go straight to the offending function and (hopefully) rewrite it to not use recursion. 4/5pic.twitter.com/f1IpDrkFnN
Prikaži ovu nit -
Extracting stack usage info from Thumb machine code has been improved and the tool can now compute the stack usage of functions that do *not* contain ifs or loops. Useful for "trampolines" written as `global_asm!` or `#[naked]` functions + `asm!` which LLVM won't analyze! 2/5pic.twitter.com/JAJF48bJFV
Prikaži ovu nit -
v0.1.3 of cargo-call-stack, a stack usage analysis tool, is out!
https://github.com/japaric/cargo-call-stack/blob/master/CHANGELOG.md#v013---2019-03-24 …
The biggest change is that the user no longer needs linker script magic to preserve the `.stack_sizes` section. Run the tool on "Hello, world" and the graph will contain stack info!
1/5pic.twitter.com/G88VUtK9lc
Prikaži ovu nit -
Also, the tool now extracts even more call graph information from (ARM Cortex-M) machine code (i.e. it searches for jump instructions in it) This is particularly useful when dealing with programs that call into external C code or into the compiler-builtins crate 2/3pic.twitter.com/Gpm1kubra7
Prikaži ovu nit -
The third release (v0.1.2) of `cargo-call-stack`, the whole program stack usage analyzer, is now on crates-io
https://github.com/japaric/cargo-call-stack/blob/master/CHANGELOG.md#v012---2019-03-12 …
Biggest feature is that the tool now properly handles programs that use `core::fmt`, which does some clever function pointer transmutes
1/3pic.twitter.com/ToxYXNKIKP
Prikaži ovu nit -
Fun with pointers The tool will also try to deal with calls via function pointers. Again, it works OK in some cases and in some cases it will be plain wrong. Best to stick to direct function calls! Here's an OK example. `i1 ()*` means `fn() -> bool`. 6/8pic.twitter.com/tny15ttlJr
Prikaži ovu nit -
`dyn`amic dispatch The tool will attempt to reason about dynamic dispatch (trait objects). It works! ... kinda ... in some cases, but you don't need a custom compiler (just nightly) Here's an OK example. `i1 ({}*)` means some `fn(&self) -> bool` trait method. 5/8pic.twitter.com/TexDx0A6qn
Prikaži ovu nit -
Cycles? No problem The tool will analyze call graphs that contain cycles (i.e. recursion) instead of giving up. It may not always be possible to upper bound the stack usage though! Here's an example where an upper bound can be computed 4/8pic.twitter.com/PGEz2t9HM4
Prikaži ovu nit -
Filters! Interested in the stack usage of only a certain function? Specify it as the _start point_ and the tool will display only the call graph that starts from that node Example: same program as before but this time `main` was chosen as the start point 3/8pic.twitter.com/3HreoyCt3l
Prikaži ovu nit -
Less cluttered graphs! The hash suffixes (e.g. ::h1337dead10cc4242) are not shown on symbols that are unambiguous. Plus only a single edge is drawn between two nodes regardless of the number times one calls the other. Here's an example. 2/8pic.twitter.com/PUZTfjDIFd
Prikaži ovu nit -
Did you know that
#ARM Cortex-M microcontrollers have hardware support for profiling and tracing in the form of the ITM peripheral? I wrote some#rustlang tools to analyze those ITM traces! https://github.com/japaric/itm-tools … Left: Tracing interrupt handling Right: Profiling firmwarepic.twitter.com/XvLnMymHGi
-
Trickiest bit: ensuring that all binaries have the same layout for shared memory. e.g. `SHARED` must have the same address on all binaries regardless of optimizations. Solution: `cargo-amp`! It does a custom build process and then checks that all binaries look correct. 3/3pic.twitter.com/6WTYbbPMD9
Prikaži ovu nit -
In the application the two cores increase the value of a shared variable in turns. Access is synchronized using a semaphore which also resides in shared memory. Here the target cores are R5s but the approach can be applied to heterogeneous devices e.g. M4F + M0+. 2/pic.twitter.com/JB8T6hEsPP
Prikaži ovu nit -
A sneak peek at my Rust experiments in single source, no-std asymmetric multiprocessing! The clip shows the source of a dual core application from which I build two binaries using a Cargo subcommand Then I load each binary on a different Cortex-R5 core and run them 1/pic.twitter.com/6ztZCWHcg8
Prikaži ovu nit -
With a bit of help from the compiler the tool can also reason about indirect function calls, namely trait objects! Here's a program that does dynamic dispatch. The tool is able to figure out that there only *2* (not 3) trait implementations in the final binary. 2/3pic.twitter.com/FijuaM2OD0
Prikaži ovu nit -
Pleased to announce the first release of cargo-call-stack
A Cargo subcommand for whole program, static stack analysis of @rustembedded programs https://github.com/japaric/cargo-call-stack#cargo-call-stack … Pic shows the call graph and stack usage of a program that only does direct function calls 1/3pic.twitter.com/LqlK0zv6AA
Prikaži ovu nit
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.