prefixsim 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. prefixsim-0.1.0/.gitignore +8 -0
  2. prefixsim-0.1.0/.gitmodules +3 -0
  3. prefixsim-0.1.0/CMakeLists.txt +62 -0
  4. prefixsim-0.1.0/LICENSE +202 -0
  5. prefixsim-0.1.0/PKG-INFO +122 -0
  6. prefixsim-0.1.0/README.md +92 -0
  7. prefixsim-0.1.0/csrc/bindings.cpp +234 -0
  8. prefixsim-0.1.0/extern/PrefixSim/.clang-format +168 -0
  9. prefixsim-0.1.0/extern/PrefixSim/.gitignore +13 -0
  10. prefixsim-0.1.0/extern/PrefixSim/.gitmodules +3 -0
  11. prefixsim-0.1.0/extern/PrefixSim/CMakeLists.txt +97 -0
  12. prefixsim-0.1.0/extern/PrefixSim/LICENSE +202 -0
  13. prefixsim-0.1.0/extern/PrefixSim/README.md +214 -0
  14. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.clang-format +168 -0
  15. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.clang-tidy +34 -0
  16. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.clang-tidy-ignore +4 -0
  17. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.editorconfig +31 -0
  18. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.gitignore +37 -0
  19. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.readthedocs.yaml +24 -0
  20. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.sshyncignore +3 -0
  21. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/.gitignore +9 -0
  22. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/configs/.hadolint.yaml +4 -0
  23. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/configs/.isort.cfg +2 -0
  24. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/configs/.markdownlint.yaml +2 -0
  25. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/configs/.shellcheckrc +7 -0
  26. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/configs/.yamllint.yaml +7 -0
  27. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/configs/ruff.toml +5 -0
  28. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/configs/svgo.config.mjs +14 -0
  29. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.trunk/trunk.yaml +47 -0
  30. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.vscode/c_cpp_properties.json +89 -0
  31. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.vscode/launch.json +26 -0
  32. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.vscode/settings.json +137 -0
  33. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/.vscode/tasks.json +15 -0
  34. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/CITATION.cff +121 -0
  35. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/CMakeLists.txt +353 -0
  36. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/CODE_OF_CONDUCT.md +133 -0
  37. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/CONTRIBUTING.md +98 -0
  38. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/FAQ.md +47 -0
  39. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/LICENSE +202 -0
  40. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/NOTICE +39 -0
  41. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/README.md +512 -0
  42. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/SECURITY.md +36 -0
  43. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/cmake/Modules/FindGLib.cmake +83 -0
  44. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/cmake/Modules/FindTcmalloc.cmake +48 -0
  45. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/cmake/Modules/FindZSTD.cmake +41 -0
  46. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/cmake/Modules/FindZSTD0.cmake +195 -0
  47. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/cmake/Modules/Findargp.cmake +84 -0
  48. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/cmake/Modules/FindxxHash.cmake +66 -0
  49. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/cmake/Version.cmake +51 -0
  50. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/CMakeLists.txt +15 -0
  51. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/MRC/CMakeLists.txt +20 -0
  52. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/MRC/Miniatures.c +27 -0
  53. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/MRC/SHARDS.c +141 -0
  54. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/MRC/main.c +69 -0
  55. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/MRC/mrc_internal.h +108 -0
  56. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/MRC/parser_mini.c +579 -0
  57. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/MRC/parser_shard.c +162 -0
  58. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cachesim/CMakeLists.txt +14 -0
  59. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cachesim/cache_init.h +120 -0
  60. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cachesim/cli_parser.c +669 -0
  61. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cachesim/internal.h +69 -0
  62. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cachesim/main.c +117 -0
  63. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cachesim/sim.c +148 -0
  64. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cli_reader_utils.c +380 -0
  65. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/cli_reader_utils.h +30 -0
  66. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/SOSP23/CMakeLists.txt +31 -0
  67. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/SOSP23/flash/flash.cpp +133 -0
  68. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/SOSP23/flash/flash.hpp +85 -0
  69. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/SOSP23/oneHit/cli_parser.c +165 -0
  70. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/SOSP23/oneHit/internal.h +41 -0
  71. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/SOSP23/oneHit/main.c +24 -0
  72. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/SOSP23/oneHit/oneHit.cpp +66 -0
  73. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/fast23/CMakeLists.txt +16 -0
  74. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/fast23/compareGrouping.cpp +380 -0
  75. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/fast23/compareGroups.cpp +93 -0
  76. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/fast23/fast23.h +56 -0
  77. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/fast23/main.cpp +66 -0
  78. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/customized/fast23/objectInfo.cpp +116 -0
  79. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/debug/CMakeLists.txt +16 -0
  80. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/debug/aligned.c +351 -0
  81. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/debug/fileOp.cpp +64 -0
  82. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/debug/main.cpp +38 -0
  83. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/distUtil/CMakeLists.txt +13 -0
  84. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/distUtil/cli.c +196 -0
  85. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/distUtil/internal.h +33 -0
  86. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/distUtil/main.c +42 -0
  87. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/mrcProfiler/CMakeLists.txt +27 -0
  88. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/mrcProfiler/cli_parser.cpp +476 -0
  89. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/mrcProfiler/internal.h +45 -0
  90. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/mrcProfiler/main.cpp +58 -0
  91. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/priv/CMakeLists.txt +3 -0
  92. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/priv/lesscache/CMakeLists.txt +10 -0
  93. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/priv/lesscache/main.c +162 -0
  94. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceAnalyzer/CMakeLists.txt +20 -0
  95. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceAnalyzer/cli_parser.cpp +287 -0
  96. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceAnalyzer/internal.h +38 -0
  97. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceAnalyzer/main.cpp +29 -0
  98. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/CMakeLists.txt +62 -0
  99. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/cli_parser.cpp +261 -0
  100. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/internal.hpp +125 -0
  101. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/traceConvLCS.cpp +507 -0
  102. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/traceConvMain.cpp +76 -0
  103. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/traceConvOracleGeneral.cpp +209 -0
  104. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/traceFilterMain.cpp +105 -0
  105. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/tracePrintMain.cpp +63 -0
  106. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/bin/traceUtils/utils.cpp +53 -0
  107. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/CMakeLists.txt +216 -0
  108. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/admission/adaptsize/adaptsize.cpp +348 -0
  109. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/admission/adaptsize/adaptsize.h +55 -0
  110. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/admission/adaptsize/adaptsize_interface.cpp +173 -0
  111. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/admission/bloomfilter.c +73 -0
  112. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/admission/prob.c +106 -0
  113. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/admission/size.c +95 -0
  114. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/admission/sizeProbabilistic.c +118 -0
  115. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/cache.c +567 -0
  116. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/cacheAlgoRegistry.c +126 -0
  117. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/cacheUtils.h +42 -0
  118. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/3LCache/ThreeLCache.cpp +467 -0
  119. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/3LCache/ThreeLCache.hpp +437 -0
  120. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/3LCache/ThreeLCache_Interface.cpp +389 -0
  121. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/3LCache/cache.h +99 -0
  122. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/3LCache/common.h +56 -0
  123. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/3LCache/request.h +63 -0
  124. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/3LCache/utils.hpp +61 -0
  125. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/ARC.c +816 -0
  126. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/ARCv0.c +612 -0
  127. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Belady.c +295 -0
  128. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/BeladyCompute.c +383 -0
  129. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/BeladySize.c +337 -0
  130. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/CAR.c +699 -0
  131. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/CR_LFU.c +487 -0
  132. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Cacheus.c +432 -0
  133. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Clock.c +347 -0
  134. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Clock2QPlus.c +523 -0
  135. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/ClockPro.c +639 -0
  136. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/FIFO.c +238 -0
  137. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/FIFO_Merge.c +459 -0
  138. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/FIFO_Reinsertion.c +483 -0
  139. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/GLCache.c +484 -0
  140. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/GLCacheInternal.h +301 -0
  141. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/README +60 -0
  142. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/bucket.c +65 -0
  143. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/cacheState.h +33 -0
  144. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/const.h +60 -0
  145. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/dataPrep.c +475 -0
  146. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/eviction.c +179 -0
  147. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/inference.c +177 -0
  148. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/init.c +99 -0
  149. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/obj.h +87 -0
  150. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/segSel.c +432 -0
  151. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/segment.c +254 -0
  152. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/train.c +132 -0
  153. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/GLCache/utils.h +93 -0
  154. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Hyperbolic.c +293 -0
  155. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LFU.c +382 -0
  156. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LFUDA.c +400 -0
  157. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/CMakeLists.txt +4 -0
  158. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/LHD_Interface.cpp +338 -0
  159. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/LHD_compute_interface.cpp +338 -0
  160. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/LICENSE +25 -0
  161. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/README +76 -0
  162. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/bytes.hpp +29 -0
  163. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/candidate.hpp +100 -0
  164. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/constants.hpp +8 -0
  165. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/lhd.cpp +369 -0
  166. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/lhd.hpp +210 -0
  167. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/lhd_compute.cpp +372 -0
  168. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/lhd_compute.hpp +208 -0
  169. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LHD/repl.hpp +27 -0
  170. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LIRS.c +960 -0
  171. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRB/LRB_Interface.cpp +380 -0
  172. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRB/cache.h +99 -0
  173. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRB/common.h +56 -0
  174. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRB/lrb.cpp +496 -0
  175. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRB/lrb.h +465 -0
  176. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRB/request.h +61 -0
  177. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRB/utils.h +60 -0
  178. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRU.c +300 -0
  179. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRUProb.c +295 -0
  180. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LRUv0.c +276 -0
  181. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LeCaR.c +803 -0
  182. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/LeCaRv0.c +365 -0
  183. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/MQ.c +521 -0
  184. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/MRU.c +212 -0
  185. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/QDLP.c +490 -0
  186. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Random.c +183 -0
  187. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/RandomCompute.c +295 -0
  188. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/RandomComputeSmallQueue.c +287 -0
  189. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/RandomLRU.c +289 -0
  190. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/RandomTwo.c +202 -0
  191. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S3FIFO.c +535 -0
  192. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S3FIFOd.c +590 -0
  193. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S3FIFOv0.c +530 -0
  194. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S4FIFO/S4FIFO.c +898 -0
  195. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S4FIFO/S4FIFO_features.h +382 -0
  196. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S4FIFO/S4FIFO_model_real.c +300 -0
  197. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S4FIFO/S4FIFO_model_real.h +52 -0
  198. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S4FIFO/S4FIFO_predictor.c +193 -0
  199. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S4FIFO/S4FIFO_predictor.h +97 -0
  200. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/S4FIFO/model.h +88210 -0
  201. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/SLRU.c +632 -0
  202. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/SLRUv0.c +459 -0
  203. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/SR_LRU.c +506 -0
  204. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Sieve.c +298 -0
  205. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/Size.c +264 -0
  206. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/TwoQ.c +368 -0
  207. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/WTinyLFU.c +471 -0
  208. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/belady/FIFO_Belady.c +290 -0
  209. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/belady/LRU_Belady.c +306 -0
  210. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/belady/Sieve_Belady.c +314 -0
  211. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/AsymCache.cpp +597 -0
  212. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/GDSF.cpp +314 -0
  213. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/GDSF_compute.cpp +326 -0
  214. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/LFU.cpp +224 -0
  215. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/LRU_K.cpp +372 -0
  216. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/PartialNodeRandomCompute.cpp +42 -0
  217. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/PartialNodeRandomComputeSmallQueue.cpp +58 -0
  218. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/PartialNodeRandomFreq.cpp +43 -0
  219. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/WorkloadAware.cpp +541 -0
  220. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/abstractRank.hpp +116 -0
  221. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/merlin.cpp +710 -0
  222. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/partialNodeCache.cpp +491 -0
  223. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/partialNodeCache.hpp +150 -0
  224. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/prefixRadixTree.cpp +257 -0
  225. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/prefixRadixTree.hpp +134 -0
  226. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/cpp/sessionCache.cpp +690 -0
  227. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/fifo/LP_ARC.c +571 -0
  228. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/fifo/LP_SFIFO.c +458 -0
  229. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/fifo/LP_TwoQ.c +381 -0
  230. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/fifo/SFIFO.c +557 -0
  231. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/fifo/SFIFOv0.c +479 -0
  232. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/nop.c +212 -0
  233. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/other/S3LRU.c +511 -0
  234. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/other/flashProb.c +414 -0
  235. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/eviction/plugin_cache.c +442 -0
  236. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/plugin.c +127 -0
  237. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/prefetch/Mithril.c +1163 -0
  238. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/prefetch/OBL.c +187 -0
  239. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/cache/prefetch/PG.c +410 -0
  240. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/CMakeLists.txt +26 -0
  241. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/README.md +12 -0
  242. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/bloom.c +155 -0
  243. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/bloom.h +164 -0
  244. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/hash.h +66 -0
  245. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/murmur3.c +551 -0
  246. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/murmur3.h +31 -0
  247. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/wyhash.h +242 -0
  248. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/xxh3.h +2762 -0
  249. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/xxh_x86dispatch.c +776 -0
  250. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/xxh_x86dispatch.h +98 -0
  251. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/xxhash.c +42 -0
  252. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hash/xxhash.h +2199 -0
  253. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/bulkChainingHashTable.c.unfinished +968 -0
  254. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/bulkChainingHashTable.h.unfinished +61 -0
  255. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/chainedHashTable.h +70 -0
  256. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/chainedHashTableV2.c +498 -0
  257. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/chainedHashTableV2.h +61 -0
  258. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/chainedHashtable.c +428 -0
  259. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/hashtable.h +94 -0
  260. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/hashtable/hashtableStruct.h +49 -0
  261. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/histogram.c +150 -0
  262. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/histogram.h +30 -0
  263. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ketama/ketama.c +576 -0
  264. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ketama/ketama.h +112 -0
  265. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ketama/md5.c +365 -0
  266. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ketama/md5.h +100 -0
  267. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/minimalIncrementCBF.c +180 -0
  268. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/minimalIncrementCBF.h +145 -0
  269. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/minvaluemap.hpp +56 -0
  270. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/pqueue.c +271 -0
  271. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/pqueue.h +205 -0
  272. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/robin_hood.h +2634 -0
  273. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/README.md +349 -0
  274. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp.h +4091 -0
  275. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_config.h +788 -0
  276. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_dlalloc.h +3595 -0
  277. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_memory.h +183 -0
  278. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_smartptr.h +84 -0
  279. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_stdint.h +16 -0
  280. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_timer.h +55 -0
  281. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_traits.h +179 -0
  282. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/sparsepp/spp_utils.h +454 -0
  283. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/splay.c +310 -0
  284. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/splay.h +46 -0
  285. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/splay_tuple.c +298 -0
  286. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/splay_tuple.h +57 -0
  287. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/splaytree.hpp +424 -0
  288. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ut/utarray.h +290 -0
  289. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ut/uthash.h +1230 -0
  290. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ut/utlist.h +1136 -0
  291. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ut/utringbuffer.h +138 -0
  292. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ut/utstack.h +87 -0
  293. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/dataStructure/ut/utstring.h +358 -0
  294. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/config.h +69 -0
  295. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/config.h.in +22 -0
  296. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/admissionAlgo.h +60 -0
  297. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/cache.h +476 -0
  298. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/cacheObj.h +548 -0
  299. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/const.h +65 -0
  300. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/dist.h +91 -0
  301. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/enum.h +121 -0
  302. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/evictionAlgo/Cacheus.h +26 -0
  303. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/evictionAlgo.h +295 -0
  304. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/experimental/distHeatmap.h +53 -0
  305. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/experimental/heatmap.h +72 -0
  306. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/llmCostModel.h +75 -0
  307. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/logging.h +143 -0
  308. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/macro.h +188 -0
  309. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/mem.h +36 -0
  310. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/plugin.h +207 -0
  311. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/prefetchAlgo/Mithril.h +353 -0
  312. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/prefetchAlgo/OBL.h +29 -0
  313. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/prefetchAlgo/PG.h +87 -0
  314. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/prefetchAlgo.h +66 -0
  315. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/profilerLRU.h +42 -0
  316. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/reader.h +315 -0
  317. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/request.h +142 -0
  318. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/sampling.h +54 -0
  319. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim/simulator.h +94 -0
  320. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/include/libCacheSim.h +33 -0
  321. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/mrcProfiler/CMakeLists.txt +29 -0
  322. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/mrcProfiler/mrcProfiler.cpp +475 -0
  323. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/mrcProfiler/mrcProfiler.h +280 -0
  324. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/perf.txt +43 -0
  325. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/profiler/CMakeLists.txt +26 -0
  326. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/profiler/dist.c +286 -0
  327. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/profiler/profilerLRU.c +101 -0
  328. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/profiler/simulator.c +392 -0
  329. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/CMakeLists.txt +41 -0
  330. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/accessPattern.cpp +105 -0
  331. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/accessPattern.h +59 -0
  332. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/analyzer.cpp +365 -0
  333. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/analyzer.h +204 -0
  334. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/dep/writeFutureReuse.hpp +186 -0
  335. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/dep/writeReuse.hpp +152 -0
  336. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/createFutureReuseCCDF.cpp +99 -0
  337. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/createFutureReuseCCDF.hpp +95 -0
  338. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/lifetime.cpp +95 -0
  339. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/lifetime.hpp +31 -0
  340. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/probAtAge.cpp +43 -0
  341. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/probAtAge.hpp +44 -0
  342. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/scanDetector.hpp +229 -0
  343. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/sizeChange.cpp +71 -0
  344. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/experimental/sizeChange.hpp +163 -0
  345. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/op.h +58 -0
  346. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/plotData/heatmapData.hpp +75 -0
  347. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/plotData/oneDimData.hpp +8 -0
  348. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/popularity.cpp +96 -0
  349. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/popularity.h +69 -0
  350. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/popularityDecay.cpp +72 -0
  351. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/popularityDecay.h +103 -0
  352. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/reqRate.cpp +72 -0
  353. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/reqRate.h +70 -0
  354. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/reuse.cpp +122 -0
  355. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/reuse.h +62 -0
  356. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/size.cpp +100 -0
  357. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/size.h +65 -0
  358. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/struct.h +24 -0
  359. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/ttl.cpp +47 -0
  360. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/ttl.h +56 -0
  361. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/linReg.h +52 -0
  362. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/threadPool.h +38 -0
  363. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/utils.h +43 -0
  364. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/utilsCompress.h +38 -0
  365. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/utilsMath.h +76 -0
  366. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/utilsPrint.h +38 -0
  367. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/utilsStr.h +45 -0
  368. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/include/utilsSys.h +16 -0
  369. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/threadPool.cpp +74 -0
  370. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/utils.cpp +9 -0
  371. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceAnalyzer/utils/utilsSys.cpp +83 -0
  372. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/CMakeLists.txt +35 -0
  373. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/README.md +6 -0
  374. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/binaryUtils.h +56 -0
  375. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/lcp.c +342 -0
  376. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/lcp.h +160 -0
  377. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/lcs.c +244 -0
  378. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/lcs.h +225 -0
  379. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/llmCostModel.c +135 -0
  380. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/oracle/oracleGeneralBin.h +61 -0
  381. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/oracle/oracleTwrBin.h +120 -0
  382. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/oracle/oracleTwrNSBin.h +116 -0
  383. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/oracle/oracleUtils.h +26 -0
  384. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/twrBin.h +69 -0
  385. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/twrNSBin.h +69 -0
  386. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/valpinBin.h +32 -0
  387. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/customizedReader/vscsi.h +190 -0
  388. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/binary.c +282 -0
  389. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/csv.c +411 -0
  390. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/libcsv.c +544 -0
  391. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/libcsv.h +100 -0
  392. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/synthetic.c +188 -0
  393. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/synthetic.h +18 -0
  394. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/syntheticRng.h +47 -0
  395. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/txt.c +42 -0
  396. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/zstdReader.c +214 -0
  397. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/generalReader/zstdReader.h +45 -0
  398. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/reader.c +639 -0
  399. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/readerInternal.h +129 -0
  400. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/readerRequest.c +155 -0
  401. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/sampling/SHARD.c +61 -0
  402. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/sampling/spatial.c +77 -0
  403. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/traceReader/sampling/temporal.c +69 -0
  404. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/CMakeLists.txt +22 -0
  405. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/dep/mem.c +194 -0
  406. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/dep/mem.h +64 -0
  407. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/include/mymath.h +71 -0
  408. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/include/myprint.h +21 -0
  409. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/include/mystr.h +29 -0
  410. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/include/mysys.h +33 -0
  411. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/include/mytime.h +11 -0
  412. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/logging.c +41 -0
  413. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/mymath.c +34 -0
  414. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/mystr.c +69 -0
  415. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim/utils/mysys.c +161 -0
  416. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim.cmake.in +11 -0
  417. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/libCacheSim.pc.in +15 -0
  418. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/references.md +52 -0
  419. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/requirements.txt +4 -0
  420. prefixsim-0.1.0/extern/PrefixSim/libCacheSim/version.txt +1 -0
  421. prefixsim-0.1.0/extern/PrefixSim/src/cost_model.hpp +69 -0
  422. prefixsim-0.1.0/extern/PrefixSim/src/jsonl_writer.cpp +107 -0
  423. prefixsim-0.1.0/extern/PrefixSim/src/jsonl_writer.hpp +31 -0
  424. prefixsim-0.1.0/extern/PrefixSim/src/lcp_writer.cpp +282 -0
  425. prefixsim-0.1.0/extern/PrefixSim/src/lcp_writer.hpp +31 -0
  426. prefixsim-0.1.0/extern/PrefixSim/src/main.cpp +500 -0
  427. prefixsim-0.1.0/extern/PrefixSim/src/simulator.cpp +607 -0
  428. prefixsim-0.1.0/extern/PrefixSim/src/simulator.hpp +177 -0
  429. prefixsim-0.1.0/extern/PrefixSim/src/trace.cpp +416 -0
  430. prefixsim-0.1.0/extern/PrefixSim/src/trace.hpp +165 -0
  431. prefixsim-0.1.0/extern/PrefixSim/tools/traceConvLLM.cpp +185 -0
  432. prefixsim-0.1.0/pyproject.toml +70 -0
  433. prefixsim-0.1.0/src/prefixsim/__init__.py +276 -0
  434. prefixsim-0.1.0/src/prefixsim/model.py +152 -0
  435. prefixsim-0.1.0/tests/conftest.py +31 -0
  436. prefixsim-0.1.0/tests/test_model.py +86 -0
  437. prefixsim-0.1.0/tests/test_simulate.py +84 -0
  438. prefixsim-0.1.0/third_party/NOTICE.md +18 -0
  439. prefixsim-0.1.0/third_party/glib-LGPL-2.1.txt +502 -0
  440. prefixsim-0.1.0/third_party/pcre-LICENCE.txt +93 -0
  441. prefixsim-0.1.0/third_party/sysprof-capture-COPYING.txt +49 -0
  442. prefixsim-0.1.0/third_party/zstd-LICENSE.txt +30 -0
@@ -0,0 +1,8 @@
1
+ build/
2
+ dist/
3
+ *.egg-info/
4
+ __pycache__/
5
+ *.so
6
+ .venv/
7
+ .pytest_cache/
8
+ wheelhouse/
@@ -0,0 +1,3 @@
1
+ [submodule "extern/PrefixSim"]
2
+ path = extern/PrefixSim
3
+ url = https://github.com/cacheMon/PrefixSim.git
@@ -0,0 +1,62 @@
1
+ cmake_minimum_required(VERSION 3.15...3.31)
2
+ project(prefixsim_python LANGUAGES C CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON) # static libs linked into a shared module
6
+
7
+ set(PREFIXSIM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/PrefixSim)
8
+ if(NOT EXISTS ${PREFIXSIM_DIR}/libCacheSim/CMakeLists.txt)
9
+ message(FATAL_ERROR "run `git submodule update --init --recursive`")
10
+ endif()
11
+
12
+ # tcmalloc must own the heap from process start, so it cannot come in with a module.
13
+ set(CMAKE_DISABLE_FIND_PACKAGE_Tcmalloc ON)
14
+
15
+ # For wheels: manylinux counts glib as a system library, so auditwheel does not
16
+ # bundle it, but slim images lack it. libCacheSim links glib by the name
17
+ # glib-2.0, and a target of that name takes precedence: point it at the static
18
+ # archive and its static dependencies (pkg-config --static).
19
+ option(PREFIXSIM_STATIC_GLIB "link glib statically" OFF)
20
+ if(PREFIXSIM_STATIC_GLIB)
21
+ find_package(PkgConfig REQUIRED)
22
+ pkg_check_modules(GLIB_STATIC REQUIRED glib-2.0)
23
+ set(glib_deps "")
24
+ foreach(lib IN LISTS GLIB_STATIC_STATIC_LIBRARIES)
25
+ if(lib MATCHES "^(glib-2.0|m|dl|pthread|rt)$")
26
+ continue()
27
+ endif()
28
+ find_library(${lib}_archive lib${lib}.a REQUIRED)
29
+ list(APPEND glib_deps ${${lib}_archive})
30
+ endforeach()
31
+ find_library(glib_archive libglib-2.0.a REQUIRED)
32
+ find_package(Threads REQUIRED)
33
+ add_library(glib-2.0 STATIC IMPORTED GLOBAL)
34
+ set_target_properties(glib-2.0 PROPERTIES IMPORTED_LOCATION ${glib_archive}
35
+ INTERFACE_LINK_LIBRARIES "${glib_deps};Threads::Threads;m")
36
+ message(STATUS "glib linked statically: ${glib_archive} ${glib_deps}")
37
+ endif()
38
+ # libCacheSim's xxhash (0.7.4) reads keys through a packed union when GCC targets
39
+ # ARM, which breaks strict aliasing: on Linux aarch64 at -O3 the hash table then
40
+ # hashes stale stack bytes and cannot find what it just inserted. Use the memcpy
41
+ # reads that x86 and clang already get; they compile to the same loads.
42
+ add_compile_definitions(XXH_FORCE_MEMORY_ACCESS=0)
43
+ set(PREFIXSIM_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
44
+ add_subdirectory(${PREFIXSIM_DIR} ${CMAKE_BINARY_DIR}/PrefixSim EXCLUDE_FROM_ALL)
45
+ # upstream's -Werror should not fail the build on a newer compiler
46
+ foreach(target libCacheSim prefixsim_lib)
47
+ target_compile_options(${target} PRIVATE -Wno-error)
48
+ endforeach()
49
+
50
+ find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
51
+ find_package(pybind11 CONFIG REQUIRED)
52
+ pybind11_add_module(_core MODULE csrc/bindings.cpp)
53
+ target_link_libraries(_core PRIVATE prefixsim_lib)
54
+ # libCacheSim links glib by name and adds its directory only in its own scope
55
+ # (see PrefixSim's CMakeLists); glib is off the default path on macOS
56
+ get_directory_property(glib_dirs DIRECTORY ${PREFIXSIM_DIR}/libCacheSim
57
+ DEFINITION GLib_LIBRARY_DIRS)
58
+ target_link_directories(_core PRIVATE ${glib_dirs})
59
+ if(PREFIXSIM_STATIC_GLIB)
60
+ target_link_options(_core PRIVATE -Wl,--exclude-libs,ALL) # keep the bundled glib private
61
+ endif()
62
+ install(TARGETS _core LIBRARY DESTINATION prefixsim)
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,122 @@
1
+ Metadata-Version: 2.4
2
+ Name: prefixsim
3
+ Version: 0.1.0
4
+ Summary: Python bindings for PrefixSim, the KV-block prefix-cache simulator
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: extern/PrefixSim/LICENSE
8
+ License-File: extern/PrefixSim/libCacheSim/LICENSE
9
+ License-File: extern/PrefixSim/libCacheSim/NOTICE
10
+ License-File: third_party/NOTICE.md
11
+ License-File: third_party/glib-LGPL-2.1.txt
12
+ License-File: third_party/pcre-LICENCE.txt
13
+ License-File: third_party/sysprof-capture-COPYING.txt
14
+ License-File: third_party/zstd-LICENSE.txt
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: C++
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Project-URL: Homepage, https://github.com/haochengxia/PrefixSim-python
23
+ Project-URL: Issues, https://github.com/haochengxia/PrefixSim-python/issues
24
+ Project-URL: PrefixSim, https://github.com/cacheMon/PrefixSim
25
+ Requires-Python: >=3.10
26
+ Requires-Dist: huggingface_hub>=0.20
27
+ Provides-Extra: test
28
+ Requires-Dist: pytest>=7; extra == "test"
29
+ Description-Content-Type: text/markdown
30
+
31
+ # PrefixSim-python
32
+
33
+ Python bindings for [PrefixSim](https://github.com/cacheMon/PrefixSim). The
34
+ simulation is PrefixSim's own C++ (the `extern/PrefixSim` submodule), so results
35
+ match its CLI. The Python layer adds:
36
+
37
+ - cache sizes in bytes (`"24GiB"`), from a model's KV size and the trace's block size;
38
+ - models from their Hugging Face config: KV bytes per token and a prefill-FLOPs cost model;
39
+ - parallel sweeps, one process per (algorithm, cache size);
40
+ - engine metrics: hits before each request's first miss, which is what vLLM and SGLang reuse.
41
+
42
+ ## Install
43
+
44
+ ```bash
45
+ pip install prefixsim
46
+ ```
47
+
48
+ Wheels are prebuilt for Python 3.10–3.14 on Linux (x86_64 and aarch64, glibc
49
+ 2.34+: Ubuntu 22.04+, Debian 12+, RHEL 9+) and Apple-silicon macOS, with
50
+ PrefixSim, libCacheSim, glib and zstd inside: there is nothing to compile or
51
+ install first. Elsewhere pip builds from source, which needs a C++17 compiler,
52
+ glib, zstd and Python's headers.
53
+
54
+ ## Use
55
+
56
+ ```python
57
+ import prefixsim
58
+
59
+ trace = prefixsim.download_trace("freeinference") # 76 MB, cached by Hugging Face
60
+
61
+ # blocks, as the CLI
62
+ results = prefixsim.simulate(trace, "16k", "lru,s3fifo", cost_model="qwen3coder30b_blksz_16")
63
+
64
+ # bytes: the model sets the block's size and the cost model
65
+ model = prefixsim.ModelSpec.from_hf("Qwen/Qwen3-Coder-30B-A3B-Instruct")
66
+ if __name__ == "__main__": # sweep spawns worker processes
67
+ results = prefixsim.sweep(trace, ["lru", "s3fifo", "random_compute"],
68
+ ["24GiB", "48GiB", "96GiB"], model=model, csv_path="results.csv")
69
+ ```
70
+
71
+ Each result is a dict. `pandas.DataFrame(results)` gives a table.
72
+ `prefixsim.convert("trace.jsonl", "trace.lcp.zst")` turns a JSONL trace into
73
+ lcp, which streams instead of being loaded whole.
74
+
75
+ ## Metrics
76
+
77
+ `block_hit_ratio` and `compute_saving_ratio` are PrefixSim's. They count every
78
+ resident block, past a miss too (`doc/design.md`, "A block after a miss still
79
+ counts"). `engine_hit_ratio` and `engine_compute_saving_ratio` stop at the
80
+ request's first miss. The bindings measure them by probing each request's blocks
81
+ just before PrefixSim serves it, which costs about 4% time
82
+ (`engine_metrics=False` turns it off). The two can rank policies differently.
83
+ Here is freeinference at 16k blocks with `qwen3coder30b_blksz_16`:
84
+
85
+ | Algorithm | `compute_saving_ratio` | `engine_compute_saving_ratio` |
86
+ |---|---:|---:|
87
+ | `lru` | 0.5333 | 0.5333 |
88
+ | `s3fifo` | 0.5491 | 0.4984 |
89
+ | `sieve` | 0.5459 | 0.5036 |
90
+ | `random_compute` | 0.6378 | 0.3375 |
91
+
92
+ They are equal for `lru` only under the defaults, `replay_order="deepest-first"`
93
+ and `block_id="prefix"`. In that case a request touches a block's parent after
94
+ the block, so the parent is always newer and LRU's victim is a leaf. With
95
+ `prefix-order` replay, or with `raw` ids where one id can sit under different
96
+ parents, LRU leaves gaps too.
97
+
98
+ ## Notes
99
+
100
+ - **Models.** Only standard attention (MHA/GQA/MQA) and MLA, dense or MoE, are
101
+ handled. Configs with sliding-window or linear-attention layers are refused
102
+ (`strict=False` counts them as full attention). The bundled traces were cut
103
+ with Qwen3-Coder's tokenizer, so another model changes a block's bytes and
104
+ cost, not where the blocks are.
105
+ - **Randomized algorithms.** Their random number generators are reset before
106
+ every run, so a run matches the CLI whatever ran before it; `seed=` picks
107
+ another stream.
108
+ - **Aborts.** PrefixSim aborts the process on some errors, for example `s3fifo`
109
+ below 10 blocks. `sweep` runs each simulation in its own process and reports
110
+ which runs were lost.
111
+ - **Sizes.** `"64g"` is refused, because the CLI reads it as 2³⁰ × 64 blocks.
112
+ Write `"64GiB"`.
113
+ - **tcmalloc** is left out: it cannot be loaded into a running Python process.
114
+ - **License.** Apache-2.0, as PrefixSim and libCacheSim. The Linux wheels link
115
+ GLib (LGPL-2.1-or-later) statically; see `third_party/NOTICE.md`.
116
+
117
+ ## Releasing
118
+
119
+ `.github/workflows/wheels.yml` builds and tests every wheel on each push.
120
+ Running it by hand publishes to TestPyPI, and publishing a GitHub release
121
+ publishes to PyPI, both through trusted publishing. To build locally:
122
+ `uvx cibuildwheel --platform linux` (needs Docker), or `uv build --sdist`.
@@ -0,0 +1,92 @@
1
+ # PrefixSim-python
2
+
3
+ Python bindings for [PrefixSim](https://github.com/cacheMon/PrefixSim). The
4
+ simulation is PrefixSim's own C++ (the `extern/PrefixSim` submodule), so results
5
+ match its CLI. The Python layer adds:
6
+
7
+ - cache sizes in bytes (`"24GiB"`), from a model's KV size and the trace's block size;
8
+ - models from their Hugging Face config: KV bytes per token and a prefill-FLOPs cost model;
9
+ - parallel sweeps, one process per (algorithm, cache size);
10
+ - engine metrics: hits before each request's first miss, which is what vLLM and SGLang reuse.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install prefixsim
16
+ ```
17
+
18
+ Wheels are prebuilt for Python 3.10–3.14 on Linux (x86_64 and aarch64, glibc
19
+ 2.34+: Ubuntu 22.04+, Debian 12+, RHEL 9+) and Apple-silicon macOS, with
20
+ PrefixSim, libCacheSim, glib and zstd inside: there is nothing to compile or
21
+ install first. Elsewhere pip builds from source, which needs a C++17 compiler,
22
+ glib, zstd and Python's headers.
23
+
24
+ ## Use
25
+
26
+ ```python
27
+ import prefixsim
28
+
29
+ trace = prefixsim.download_trace("freeinference") # 76 MB, cached by Hugging Face
30
+
31
+ # blocks, as the CLI
32
+ results = prefixsim.simulate(trace, "16k", "lru,s3fifo", cost_model="qwen3coder30b_blksz_16")
33
+
34
+ # bytes: the model sets the block's size and the cost model
35
+ model = prefixsim.ModelSpec.from_hf("Qwen/Qwen3-Coder-30B-A3B-Instruct")
36
+ if __name__ == "__main__": # sweep spawns worker processes
37
+ results = prefixsim.sweep(trace, ["lru", "s3fifo", "random_compute"],
38
+ ["24GiB", "48GiB", "96GiB"], model=model, csv_path="results.csv")
39
+ ```
40
+
41
+ Each result is a dict. `pandas.DataFrame(results)` gives a table.
42
+ `prefixsim.convert("trace.jsonl", "trace.lcp.zst")` turns a JSONL trace into
43
+ lcp, which streams instead of being loaded whole.
44
+
45
+ ## Metrics
46
+
47
+ `block_hit_ratio` and `compute_saving_ratio` are PrefixSim's. They count every
48
+ resident block, past a miss too (`doc/design.md`, "A block after a miss still
49
+ counts"). `engine_hit_ratio` and `engine_compute_saving_ratio` stop at the
50
+ request's first miss. The bindings measure them by probing each request's blocks
51
+ just before PrefixSim serves it, which costs about 4% time
52
+ (`engine_metrics=False` turns it off). The two can rank policies differently.
53
+ Here is freeinference at 16k blocks with `qwen3coder30b_blksz_16`:
54
+
55
+ | Algorithm | `compute_saving_ratio` | `engine_compute_saving_ratio` |
56
+ |---|---:|---:|
57
+ | `lru` | 0.5333 | 0.5333 |
58
+ | `s3fifo` | 0.5491 | 0.4984 |
59
+ | `sieve` | 0.5459 | 0.5036 |
60
+ | `random_compute` | 0.6378 | 0.3375 |
61
+
62
+ They are equal for `lru` only under the defaults, `replay_order="deepest-first"`
63
+ and `block_id="prefix"`. In that case a request touches a block's parent after
64
+ the block, so the parent is always newer and LRU's victim is a leaf. With
65
+ `prefix-order` replay, or with `raw` ids where one id can sit under different
66
+ parents, LRU leaves gaps too.
67
+
68
+ ## Notes
69
+
70
+ - **Models.** Only standard attention (MHA/GQA/MQA) and MLA, dense or MoE, are
71
+ handled. Configs with sliding-window or linear-attention layers are refused
72
+ (`strict=False` counts them as full attention). The bundled traces were cut
73
+ with Qwen3-Coder's tokenizer, so another model changes a block's bytes and
74
+ cost, not where the blocks are.
75
+ - **Randomized algorithms.** Their random number generators are reset before
76
+ every run, so a run matches the CLI whatever ran before it; `seed=` picks
77
+ another stream.
78
+ - **Aborts.** PrefixSim aborts the process on some errors, for example `s3fifo`
79
+ below 10 blocks. `sweep` runs each simulation in its own process and reports
80
+ which runs were lost.
81
+ - **Sizes.** `"64g"` is refused, because the CLI reads it as 2³⁰ × 64 blocks.
82
+ Write `"64GiB"`.
83
+ - **tcmalloc** is left out: it cannot be loaded into a running Python process.
84
+ - **License.** Apache-2.0, as PrefixSim and libCacheSim. The Linux wheels link
85
+ GLib (LGPL-2.1-or-later) statically; see `third_party/NOTICE.md`.
86
+
87
+ ## Releasing
88
+
89
+ `.github/workflows/wheels.yml` builds and tests every wheel on each push.
90
+ Running it by hand publishes to TestPyPI, and publishing a GitHub release
91
+ publishes to PyPI, both through trusted publishing. To build locally:
92
+ `uvx cibuildwheel --platform linux` (needs Docker), or `uv build --sdist`.