This repository has been archived by the owner on Sep 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build formatters * update asphr-load-2 * update with airbnb version of rules_foreign_cc * update where rules is called * reset where the toolchains are * reorder commands * remove airbnb shit * perf works atleast * remove airbnb * trunk fmt Co-authored-by: Sualeh Asif <[email protected]> Co-authored-by: Ubuntu <[email protected]>
- Loading branch information
1 parent
d222508
commit ca33434
Showing
6 changed files
with
91 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
load("@rules_cc//cc:defs.bzl", "cc_library") | ||
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") | ||
|
||
package( | ||
default_visibility = ["//visibility:public"], | ||
) | ||
|
||
filegroup( | ||
name = "all_srcs", | ||
srcs = glob(["**"]), | ||
visibility = ["//:__pkg__"], | ||
) | ||
|
||
# TODO: currently requires autoconf: `sudo apt install autoconf`. Make it independant of that. | ||
configure_make( | ||
name = "gperftools_build", | ||
args = [ | ||
"install-libLTLIBRARIES", | ||
"install-perftoolsincludeHEADERS", | ||
], # the list of arguments passed to the make commands. | ||
# autogen = True, | ||
autoreconf = True, | ||
configure_in_place = True, | ||
configure_options = [ | ||
"--enable-shared=no", | ||
"--enable-frame-pointers", | ||
"--disable-libunwind", | ||
], | ||
lib_source = ":all_srcs", | ||
linkopts = ["-lpthread"], | ||
out_static_libs = select({ | ||
# "//bazel:debug_tcmalloc": ["libtcmalloc_debug.a"], | ||
"//conditions:default": ["libtcmalloc_and_profiler.a"], | ||
}), | ||
) | ||
|
||
# Workaround for https://github.com/bazelbuild/rules_foreign_cc/issues/227 | ||
|
||
cc_library( | ||
name = "gperftools", | ||
deps = [ | ||
"gperftools_build", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/benchmark/malloc_bench.cc b/benchmark/malloc_bench.cc | ||
index 371b8c6..55461b9 100644 | ||
--- a/benchmark/malloc_bench.cc | ||
+++ b/benchmark/malloc_bench.cc | ||
@@ -233,7 +233,7 @@ void randomize_one_size_class(size_t size) { | ||
for (int i = 0; i < count; i++) { | ||
randomize_buffer[i] = malloc(size); | ||
} | ||
- std::random_shuffle(randomize_buffer, randomize_buffer + count); | ||
+ // std::random_shuffle(randomize_buffer, randomize_buffer + count); | ||
for (int i = 0; i < count; i++) { | ||
free(randomize_buffer[i]); | ||
} |