coresight_find_sink(9)
π coresight_find_sink π
okay so real talk β this is a page from the Kernel API Manual, and it's about coresight_find_sink, bestie. it's literally a recursive lil function that walks the trace connections starting from a source until it finds a suitable default sink. it's giving "follow the breadcrumbs" energy and honestly? iconic. π
β¨ NAME β¨
coresight_find_sink β a recursive function that walks trace connections from a source to find a suitable default sink. no cap, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
struct coresight_device * coresight_find_sink (struct coresight_device
*csdev , int *depth );
like, yes, it returns a struct coresight_device * pointer. she's a pointer-returning girlie. π
π«Ά ARGUMENTS π«Ά
csdevβ the source / current device to check. this is who we're looking at right now, bestie. πdepthβ bestie this one's doing double duty fr fr: it's[in]the search depth of the calling dev, and[out]the depth of the found sink. in-and-out, main character energy. β¨
π₯ DESCRIPTION π₯
so what does she actually do? she walks the connection path from a source (an ETM, iykyk) until a suitable sink is encountered, and then returns that sink to the original caller. slay. π
if the current device is a plain sink, she just returns that sink & its depth β no drama, no recursion, we love a simple queen. π otherwise she recursively calls the child connections looking for a sink. and to pick the bestest one possible, she uses coresight_select_best_sink. π
she returns the best sink found β or NULL if nothing was found at this node or any of the child nodes. π (that's the sad ending, hope u never see it.)
π SEE ALSO π
the kernel file lives at ./drivers/hwtracing/coresight/coresight-core.c, and here's the whole squad β go read these too, bestie, they're all part of the lore:
struct coresight_node(9)coresight_blocks_source(9)coresight_get_sink_by_id(9)coresight_get_ref(9)coresight_put_ref(9)_coresight_build_path(9)coresight_release_path(9)coresight_select_best_sink(9)coresight_find_default_sink(9)coresight_clear_default_sink(9)coresight_timeout_action(9)
fr fr, that's the whole page. go build that path, queen. π
okay and before u go β this one's served fresh out of ./drivers/hwtracing/coresight, dated October 2026, and it's coresight_find_sink(9) in the Kernel API Manual. ty for coming to my ted talk, mwah ππ§ββοΈπ
π¦ 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