This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brendan greg's incredibleness: http://www.brendangregg.com/Perf/linux_observability_tools.png | |
| vim practice: wget https://raw.githubusercontent.com/jtgi/algs-ds/1e4f2b066f0b0f102a35e8573d9a12b1f0c19e0b/Trees/Bst.java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <xeroskernel.h> | |
| /* | |
| * Runs in user space, executing handler then | |
| * returning to previous stack of the process | |
| */ | |
| void sigtramp(void (*handler)(void *), void *ctx_frame, unsigned int old_esp) { | |
| handler(ctx_frame); | |
| syssigreturn(old_esp); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .pos 0x100 | |
| main: irmovl bottom, %esp # initialize stack | |
| irmovl a, %edi # address of the first element of a | |
| irmovl alen, %esi | |
| mrmovl (%esi), %esi # number of elements of a | |
| irmovl $0x1, %eax | |
| subl %eax, %esi # last index in a | |
| # ready to call findmax: a --> edi, last --> esi | |
| call findmax |
NewerOlder