Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

btrace(8) [plan9 man page]

BTRACE(8)						      System Manager's Manual							 BTRACE(8)

NAME
btrace - trace bitblt protocol SYNOPSIS
btrace [ -d [ d ]] [ -o ofile ] [ -b bfile ] DESCRIPTION
Btrace eavesdrops on messages to and from /dev/bitblt, interprets them as messages in the bit device protocol (see bit(3)), and prints a readable version of the messages on a trace file, btrace.out by default. After btrace is started, it runs in the background, tracing all subsequent graphics programs run in that window. Options for btrace are: -o ofile Print trace output in ofile instead of btrace.out. -b bfile Dump each bitmap read or written to bfile, using the format of bitmap(6). Each succeeding bitmap overwrites the previous con- tents of file. Tweak(1) or showimage(7) can be used to examine the file. -d Increase the level of trace detail. The maximum level is -dd. FILES
/dev/bitblt SOURCE
/sys/src/cmd/btrace.c SEE ALSO
bit(3), bitmap(6), graphics(2), tweak(1), showimage(7) BTRACE(8)

Check Out this Related Man Page

BALLOC(2)							System Calls Manual							 BALLOC(2)

NAME
balloc, bfree, rdbitmap, wrbitmap, rdbitmapfile, wrbitmapfile - allocating, freeing, reading, writing bitmaps SYNOPSIS
#include <u.h> #include <libc.h> #include <libg.h> Bitmap *balloc(Rectangle r, int ldepth) void bfree(Bitmap *b) void rdbitmap(Bitmap *b, int ymin, int ymax, uchar *data) void wrbitmap(Bitmap *b, int ymin, int ymax, uchar *data) Bitmap *rdbitmapfile(int fd) void wrbitmapfile(int fd, Bitmap *b) DESCRIPTION
A new bitmap is allocated with balloc; it will have the extent and ldepth (log base 2 of the number of bits per pixel) given by its argu- ments, and will be filled with zeros. The id field will have been set to the identifying number used by /dev/bitblt (see bit(3)), and the cache field will be zero. Balloc returns 0 if the server has run out of bitmap resources. Bfree frees the resources used by its argument bitmap. The remaining functions deal with moving groups of pixel values between bitmaps and user space or external files. There is a fixed format for the exchange and storage of bitmap data (see bitmap(6)). Rdbitmap reads rows of pixels from bitmap b into data. The rows read have y=ymin,ymin+1, ... ymax-1. Those rows must be within the range allowed by b.r. Wrbitmap replaces the specified rows of pixels in bitmap b with data. Rdbitmapfile creates a bitmap from data contained an external file (see bitmap(6) for the file format); fd is a file descriptor obtained by opening such a file for reading. The returned bitmap is allocated using balloc. Wrbitmapfile writes bitmap b onto file descriptor fd, which should be open for writing. The format is as described for rdbitmapfile. Rdbitmapfile and wrbitmapfile do not close fd. SOURCE
/sys/src/libg SEE ALSO
graphics(2), bitblt(2), bit(3), bitmap(6) DIAGNOSTICS
These functions return 0 on failure, usually due to insufficient memory. May set errstr. BUGS
Ldepth must be 0, 1, 2, or 3. BALLOC(2)
Man Page