Fix C7 warm/TLS Release path and unify debug instrumentation
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#define TINY_ROUTE_BOX_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Routing policy per Tiny class.
|
||||
typedef enum {
|
||||
@ -43,8 +44,21 @@ void tiny_route_init(void);
|
||||
// Uses simple array lookup; class_idx is masked to [0,7] defensively.
|
||||
static inline TinyRoutePolicy tiny_route_get(int class_idx)
|
||||
{
|
||||
return (TinyRoutePolicy)g_tiny_route[class_idx & 7];
|
||||
TinyRoutePolicy p = (TinyRoutePolicy)g_tiny_route[class_idx & 7];
|
||||
#if HAKMEM_BUILD_RELEASE
|
||||
if ((class_idx & 7) == 7) {
|
||||
static int rel_route_logged = 0;
|
||||
if (!rel_route_logged) {
|
||||
const char* mode =
|
||||
(p == ROUTE_TINY_ONLY) ? "TINY_ONLY" :
|
||||
(p == ROUTE_TINY_FIRST) ? "TINY_FIRST" :
|
||||
(p == ROUTE_POOL_ONLY) ? "POOL_ONLY" : "UNKNOWN";
|
||||
fprintf(stderr, "[REL_C7_ROUTE] via tiny_route_get route=%s\n", mode);
|
||||
rel_route_logged = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif // TINY_ROUTE_BOX_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user