/usr/share/systemtap/tapset
NameSizeModeActions
arm/-0755rm
arm64/-0755rm
bpf/-0755rm
dyninst/-0755rm
i386/-0755rm
ia64/-0755rm
linux/-0755rm
mips/-0755rm
powerpc/-0755rm
riscv/-0755rm
s390/-0755rm
x86_64/-0755rm
ansi.stp41780644editdlrm
argv.stp27210644editdlrm
choose_defined.stpm2080644editdlrm
container_of.stpm2350644editdlrm
context.stp61030644editdlrm
errno.stp91180644editdlrm
floatingpoint.stp69360644editdlrm
indent-default.stp590644editdlrm
indent.stp45900644editdlrm
init.stp2690644editdlrm
input.stp2630644editdlrm
java.stp13460644editdlrm
libperl5.26.3-64.stp13390644editdlrm
libpython2.7-64.stp5220644editdlrm
livepatch.stp30060644editdlrm
logging.stp41320644editdlrm
macros.stpm5620644editdlrm
null.stp170644editdlrm
offsetof.stpm1830644editdlrm
oneshot.stp380644editdlrm
pn.stp15880644editdlrm
print_stats.stpm17190644editdlrm
private30.stpm800644editdlrm
prometheus.stp1290644editdlrm
prometheus.stpm83800644editdlrm
python.stp4740644editdlrm
python2.stp294350644editdlrm
python3.stp366550644editdlrm
queue_stats.stp94870644editdlrm
random.stp4320644editdlrm
README3710644editdlrm
regex.stp41070644editdlrm
registers.stp110810644editdlrm
sizeof.stpm2120644editdlrm
speculative.stp17460644editdlrm
sreg_arch.stpm2630644editdlrm
stap_staticmarkers.stp96700644editdlrm
stopwatch.stp30630644editdlrm
string.stp75140644editdlrm
switchfile.stp6120644editdlrm
system.stp5930644editdlrm
this.stp1600644editdlrm
timers.stp9240644editdlrm
tls.stp80990644editdlrm
tokenize.stp21240644editdlrm
try_assign.stpm7680644editdlrm
type_defined.stpm3740644editdlrm
tzinfo.stp9300644editdlrm
uconversions-guru.stp60780644editdlrm
uconversions.stp366400644editdlrm
Edit: /usr/share/systemtap/tapset/ansi.stp (4178B)
# ANSI escape sequences tapset # Copyright (C) 2009 Red Hat, Inc., Eugene Teo # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # Based on some previous work done by Masami Hiramatsu for stapgames. # Reference: http://en.wikipedia.org/wiki/ANSI_escape_code # /** * sfunction ansi_clear_screen - Move cursor to top left and clear screen. * * Description: Sends ansi code for moving cursor to top left and then the * ansi code for clearing the screen from the cursor position to the end. **/ function ansi_clear_screen() { print("\033[1;1H\033[J") } /** * sfunction ansi_set_color - Set the ansi Select Graphic Rendition mode. * @fg: Foreground color to set. * * Description: Sends ansi code for Select Graphic Rendition mode for the * given forground color. Black (30), Blue (34), Green (32), Cyan (36), * Red (31), Purple (35), Brown (33), Light Gray (37). */ function ansi_set_color(fg:long) { printf("\033[%dm", fg) } /** * sfunction ansi_set_color - Set the ansi Select Graphic Rendition mode. * @fg: Foreground color to set. * @bg: Background color to set. * * Description: Sends ansi code for Select Graphic Rendition mode for the * given forground color, Black (30), Blue (34), Green (32), Cyan (36), * Red (31), Purple (35), Brown (33), Light Gray (37) and the given * background color, Black (40), Red (41), Green (42), Yellow (43), * Blue (44), Magenta (45), Cyan (46), White (47). */ function ansi_set_color(fg:long, bg:long) { printf("\033[%d;%dm", bg, fg) } function ansi_set_color2(fg:long, bg:long) { ansi_set_color(fg, bg); } /** * sfunction ansi_set_color - Set the ansi Select Graphic Rendition mode. * @fg: Foreground color to set. * @bg: Background color to set. * @attr: Color attribute to set. * * Description: Sends ansi code for Select Graphic Rendition mode for the * given forground color, Black (30), Blue (34), Green (32), Cyan (36), * Red (31), Purple (35), Brown (33), Light Gray (37), the given * background color, Black (40), Red (41), Green (42), Yellow (43), * Blue (44), Magenta (45), Cyan (46), White (47) and the color attribute * All attributes off (0), Intensity Bold (1), Underline Single (4), * Blink Slow (5), Blink Rapid (6), Image Negative (7). */ function ansi_set_color(fg:long, bg:long, attr:long) { attr_str = attr ? sprintf(";%dm", attr) : "m" printf("\033[%d;%d%s", bg, fg, attr_str) } function ansi_set_color3(fg:long, bg:long, attr:long) { ansi_set_color(fg, bg, attr); } /** * sfunction ansi_reset_color - Resets Select Graphic Rendition mode. * * Description: Sends ansi code to reset foreground, background and color * attribute to default values. */ function ansi_reset_color() { ansi_set_color(0, 0, 0) } /** * sfunction ansi_new_line - Move cursor to new line. * * Description: Sends ansi code new line. */ function ansi_new_line() { printf("\12") } /** * sfunction ansi_cursor_move - Move cursor to new coordinates. * @x: Row to move the cursor to. * @y: Colomn to move the cursor to. * * Description: Sends ansi code for positioning the cursor at row x * and column y. Coordinates start at one, (1,1) is the top-left corner. */ function ansi_cursor_move(x:long, y:long) { printf("\033[%d;%dH", y, x) } /** * sfunction ansi_cursor_hide - Hides the cursor. * * Description: Sends ansi code for hiding the cursor. */ function ansi_cursor_hide() { print("\033[>5I") } /** * sfunction ansi_cursor_save - Saves the cursor position. * * Description: Sends ansi code for saving the current cursor position. */ function ansi_cursor_save() { print("\033[s") } /** * sfunction ansi_cursor_restore - Restores a previously saved cursor position. * * Description: Sends ansi code for restoring the current cursor position * previously saved with ansi_cursor_save(). */ function ansi_cursor_restore() { print("\033[u") } /** * sfunction ansi_cursor_show - Shows the cursor. * * Description: Sends ansi code for showing the cursor. */ function ansi_cursor_show() { print("\033[>5h") }