Files
darling-lol/tools/riot-platform-memory-shim/platform/string.h
T
lucannez64andClaude Opus 5.5 4370f375cd Cut Darling overhead in League fights and add passive match capture
Game process (ARAM Hexgate: 84 -> 127 FPS average, slowest stretches ~110):
- Local pthread mutexes, condition variables and Mach semaphores are on by
  default in the game process only, with /tmp/rclol-no-local-* opt-outs.
  The main thread's darlingserver waits fell from 1.36 to 0.10 ms per frame.
- Local semaphores: the count and the slot generation change in one
  compare-exchange, a destroy leaves a negative marker, the table is reset
  after fork, and names the table did not create go to the server.
- Metal: drop identical re-binds (keyed on the Indium object, depth-stencil
  retained), pass blit resources by reference, and stop resetting vertex
  descriptors twice.
- Core isolation of the main thread is opt-in (/tmp/rclol-core-isolation);
  it lowered FPS in its only match.
- Optimized libc/libc++/Foundation overlays, AVX2 string primitives, real CPU
  topology and their installers and offline checks.

Tools and docs:
- tools/riot-match-capture: passive /proc sampler, user-space IP profiler and
  reports, plus a comparison against the game's netstats.
- tools/riot-lsem-model and tools/riot-metal-bind-model: host models that
  extract the shipped code and check it.
- tools/install-riot-metal-pair.sh installs Metal and Indium together.
- Status, setup, testing and troubleshooting docs updated with the measured
  matches and the switch table; manifest file counts match the patches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 16:48:34 +02:00

47 lines
1.8 KiB
C

/* Host-build shim standing in for Darling's private/platform/string.h.
* The only content the string sources need from it is the
* _PLATFORM_OPTIMIZED_* selection macros, all 0 in the installed build. */
#ifndef PLATFORM_STRING_SHIM_H
#define PLATFORM_STRING_SHIM_H
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
#define _PLATFORM_OPTIMIZED_BZERO 0
#define _PLATFORM_OPTIMIZED_MEMCCPY 0
#define _PLATFORM_OPTIMIZED_MEMCHR 0
#define _PLATFORM_OPTIMIZED_MEMCMP 0
#define _PLATFORM_OPTIMIZED_MEMMOVE 0
#define _PLATFORM_OPTIMIZED_MEMSET 0
#define _PLATFORM_OPTIMIZED_MEMSET_PATTERN4 0
#define _PLATFORM_OPTIMIZED_MEMSET_PATTERN8 0
#define _PLATFORM_OPTIMIZED_MEMSET_PATTERN16 0
#define _PLATFORM_OPTIMIZED_STRCHR 0
#define _PLATFORM_OPTIMIZED_STRCMP 0
#define _PLATFORM_OPTIMIZED_STRCPY 0
#define _PLATFORM_OPTIMIZED_STRLCAT 0
#define _PLATFORM_OPTIMIZED_STRLCPY 0
#define _PLATFORM_OPTIMIZED_STRLEN 0
#define _PLATFORM_OPTIMIZED_STRNCMP 0
#define _PLATFORM_OPTIMIZED_STRNCPY 0
#define _PLATFORM_OPTIMIZED_STRNLEN 0
#define _PLATFORM_OPTIMIZED_STRSTR 0
/* The host test builds the non-static variant, as the guest dylib does. */
#define VARIANT_STATIC 0
#define __FBSDID(x)
extern void *_platform_memmove(void *, const void *, size_t);
extern void *_platform_memset(void *, int, size_t);
extern void _platform_bzero(void *, size_t);
extern void _platform_memset_pattern4(void *, const void *, size_t);
extern void _platform_memset_pattern8(void *, const void *, size_t);
extern void _platform_memset_pattern16(void *, const void *, size_t);
extern size_t _platform_strlen(const char *);
extern int _platform_strcmp(const char *, const char *);
extern int _platform_memcmp(const void *, const void *, size_t);
extern void *_platform_memchr(const void *, int, size_t);
#endif