| 987 | } id_sync_probe_t; |
| 988 | |
| 989 | static void id_sync_hook(cbm_gbuf_t *gb, void *ctx) { |
| 990 | id_sync_probe_t *probe = ctx; |
| 991 | probe->syncs++; |
| 992 | const cbm_gbuf_node_t **fns = NULL; |
| 993 | int n = 0; |
| 994 | if (!probe->push || cbm_gbuf_find_by_label(gb, "Function", &fns, &n) != 0 || n < 2) { |
| 995 | return; |
| 996 | } |
| 997 | char props[CBM_SZ_64]; |
| 998 | for (int i = 0; i < ID_SYNC_PUSH; i++) { |
| 999 | snprintf(props, sizeof(props), "{\"id_sync_probe\":%d}", probe->syncs * ID_SYNC_PUSH + i); |
| 1000 | cbm_gbuf_insert_edge(gb, fns[0]->id, fns[1]->id, "CALLS", props); |
| 1001 | } |
| 1002 | } |
| 1003 | |
| 1004 | typedef struct { |
| 1005 | int edges; |
nothing calls this directly
no test coverage detected