crash.subsystem.printk.lockless_ringbuffer module¶
- class crash.subsystem.printk.lockless_ringbuffer.DevPrintkInfo(info: Value)[source]¶
Bases:
objectKernel struct dev_printk_info
- device: str¶
- subsystem: str¶
- exception crash.subsystem.printk.lockless_ringbuffer.LogConsistencyException[source]¶
Bases:
Exception
- class crash.subsystem.printk.lockless_ringbuffer.PrbDataBlkLPos(blk_lpos: Value)[source]¶
Bases:
objectKernel struct prb_data_blk_pos
- begin: int¶
- next: int¶
- class crash.subsystem.printk.lockless_ringbuffer.PrbDataBlock(dr: Value)[source]¶
Bases:
objectKernel struct prb_data_block
- id: int¶
- class crash.subsystem.printk.lockless_ringbuffer.PrbDataRing(dr: Value)[source]¶
Bases:
objectKernel struct prb_data_ring
- get_data_block(blk_lpos: PrbDataBlkLPos) PrbDataBlock[source]¶
Return PrbDataBlock for the given blk_lpos
- get_text(blk_lpos: PrbDataBlkLPos, _len: int) str[source]¶
return string stored at the given blk_lpos
- lpos_mask: int¶
- size_bits: int¶
- class crash.subsystem.printk.lockless_ringbuffer.PrbDesc(desc: Value)[source]¶
Bases:
objectKernel struct prb_desc
- is_reusable() bool[source]¶
Reusable descriptor still has a valid sequence number but the data are gone.
- state_var: int¶
- sv_mask: int¶
- sv_shift: int¶
- text_blk_lpos: PrbDataBlkLPos¶
- class crash.subsystem.printk.lockless_ringbuffer.PrbDescRing(dr: Value)[source]¶
Bases:
objectKernel struct prb_desc_ring
- count_bits: int¶
- get_info(_id: int) PrintkInfo[source]¶
return printk_info structure for the given id
- head_id: int¶
- mask_id: int¶
- tail_id: int¶
- class crash.subsystem.printk.lockless_ringbuffer.PrbRingBuffer(prb: Value)[source]¶
Bases:
objectKernel struct prb_ring_buffer
- data_ring: PrbDataRing¶
- desc_ring: PrbDescRing¶
- is_valid_desc(desc: PrbDesc, info: PrintkInfo, seq: int) bool[source]¶
Does the descritor constains consistent values?
- show_msg(desc: PrbDesc, info: PrintkInfo, args: Namespace) None[source]¶
Show the message for the gived descriptor, printk info. The output is mofified by pylog parameters.
- class crash.subsystem.printk.lockless_ringbuffer.PrintkInfo(info: Value)[source]¶
Bases:
objectKernel struct printk_info
- caller_id: int¶
- dev_info: DevPrintkInfo¶
- facility: int¶
- flags: int¶
- level: int¶
- seq: int¶
- text_len: int¶
- ts_nsec: int¶
- crash.subsystem.printk.lockless_ringbuffer.lockless_rb_show(args: Namespace) None[source]¶
Try to show printk log stored in the lockless ringbuffer
This type of ringbuffer has replaced the structured ring buffer in kernel-5.10.
- Raises:
LogTypeException – The log is not in the lockless ringbuffer.