hl_state_dum...ock_monitors(9)
π hl_state_dum...ock_monitors π
okay so bestie, welcome to the Kernel API Manual β yes we're in the kernel docs now, and honestly? it's giving backstage pass energy π. This one lives in hl_state_dum...ock_monitors(9), which is the truncated little nickname for a function with a whole government name: hl_state_dump_alloc_read_sm_block_monitors. she's long, she's iconic, she ate. π
β¨ NAME β¨
hl_state_dump_alloc_read_sm_block_monitors β reads the monitors for one specific block, no cap π«Ά
πΈ SYNOPSIS πΈ
struct hl_mon_state_dump * hl_state_dump_alloc_read_sm_block_monitors
(struct hl_device *hdev , u32 index );
literally that's the whole signature, copy it exactly bestie, don't get creative with the spacing π
π¦ ARGUMENTS π¦
hdevβ pointer to the device. yes, the device device. the main character π«Άindexβ the sync manager block index, and it starts withE_Nβ like, that's the starting point, keep that in mind π
π DESCRIPTION π
so what does she actually do? she returns an array of monitor data of size SP_MONITORS_AMOUNT β that's the size, exactly that, SP_MONITORS_AMOUNT β¨ β or NULL on error π. that's it. that's the whole vibe check. you ask for the monitors of a specific block, you either get a whole array of them or you get nothing at all. no in-between, periodt.
ngl, if you get NULL back that's the error path β don't go dereferencing it and then act surprised π
π SEE ALSO π
- Kernel file
./drivers/accel/habanalabs/common/state_dump.cβ that's her house, that's where she lives π hl_format_as_binary(9)resize_to_fit(9)hl_snprintf_resize(9)hl_sync_engine_to_string(9)hl_print_resize_sync_engine(9)hl_state_dump_get_sync_name(9)hl_state_dump_get_monitor_name(9)hl_state_dump_free_sync_to_engine_map(9)hl_state_dump_get_sync_to_engine(9)hl_state_dump_read_sync_objects(9)hl_state_dump_free_sync_objects(9)hl_state_dump_print_syncs_single_block(9)hl_state_dump_print_syncs(9)hl_state_dump_free_monitors(9)hl_state_dump_print_monitors_single_block(9)hl_state_dump_print_monitors(9)hl_state_dump_print_engine_fences(9)hl_state_dump_print_fences(9)hl_state_dump(9)
that's the whole friend group, go say hi to all of them, they're all linked, iykyk π₯
and that's the page bestie!! π§ this little gem comes to you from ./drivers/accel/habanalabs/common, dated October 2026 β so like, future vibes but make it kernel π¦. go read your state dumps, stay hydrated, and remember: SP_MONITORS_AMOUNT or NULL, there is no third option πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms