@@ -40,6 +40,8 @@ def benchmarks(self) -> list[Benchmark]:
40
40
benches = [
41
41
GBench (self ),
42
42
GBenchUmfProxy (self ),
43
+ GBenchJemalloc (self ),
44
+ GBenchTbbProxy (self ),
43
45
]
44
46
45
47
return benches
@@ -220,10 +222,31 @@ def parse_output(self, output):
220
222
return results
221
223
222
224
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 ):
224
231
def __init__ (self , bench ):
225
- super ().__init__ (bench , lib_to_be_replaced = "glibc" , replacing_lib = "umfProxy" )
232
+ super ().__init__ (bench , replacing_lib = "umfProxy" )
226
233
227
234
def extra_env_vars (self ) -> dict :
228
235
umf_proxy_path = os .path .join (options .umf , "lib" , "libumf_proxy.so" )
229
236
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