@@ -40,6 +40,8 @@ def benchmarks(self) -> list[Benchmark]:
4040 benches = [
4141 GBench (self ),
4242 GBenchUmfProxy (self ),
43+ GBenchJemalloc (self ),
44+ GBenchTbbProxy (self ),
4345 ]
4446
4547 return benches
@@ -220,10 +222,31 @@ def parse_output(self, output):
220222 return results
221223
222224
223- class GBenchUmfProxy (GBenchPreloaded ):
225+ class GBenchGlibc (GBenchPreloaded ):
226+ def __init__ (self , bench , replacing_lib ):
227+ super ().__init__ (bench , lib_to_be_replaced = "glibc" , replacing_lib = replacing_lib )
228+
229+
230+ class GBenchUmfProxy (GBenchGlibc ):
224231 def __init__ (self , bench ):
225- super ().__init__ (bench , lib_to_be_replaced = "glibc" , replacing_lib = "umfProxy" )
232+ super ().__init__ (bench , replacing_lib = "umfProxy" )
226233
227234 def extra_env_vars (self ) -> dict :
228235 umf_proxy_path = os .path .join (options .umf , "lib" , "libumf_proxy.so" )
229236 return {"LD_PRELOAD" : umf_proxy_path }
237+
238+
239+ class GBenchJemalloc (GBenchGlibc ):
240+ def __init__ (self , bench ):
241+ super ().__init__ (bench , replacing_lib = "jemalloc" )
242+
243+ def extra_env_vars (self ) -> dict :
244+ return {"LD_PRELOAD" : "libjemalloc.so" }
245+
246+
247+ class GBenchTbbProxy (GBenchGlibc ):
248+ def __init__ (self , bench ):
249+ super ().__init__ (bench , replacing_lib = "tbbProxy" )
250+
251+ def extra_env_vars (self ) -> dict :
252+ return {"LD_PRELOAD" : "libtbbmalloc_proxy.so" }
0 commit comments