Check libbcc build time instead of sha1sum.
Since libbcc.so is larger than 3+Mb, it takes a lot of time
to calculate its sha1 checksum. In order to shorten the startup
time, we introduce the build time check. There will be a string
called libbcc_build_time in libbcc.so and the cached file,
which will store the build time of libbcc.so.
In case that you have to upate libbcc.so frequently, and you
want to enable the sha1 checksum of libbcc, then you may change
USE_LIBBCC_SHA1SUM to true.
diff --git a/lib/bcc/Sha1Helper.h b/lib/bcc/Sha1Helper.h
index 6ebf967..b78c3c4 100644
--- a/lib/bcc/Sha1Helper.h
+++ b/lib/bcc/Sha1Helper.h
@@ -20,10 +20,12 @@
#include <stdint.h>
namespace bcc {
+#if defined(USE_LIBBCC_SHA1SUM)
extern unsigned char sha1LibBCC[20];
- extern unsigned char sha1LibRS[20];
-
extern char const *pathLibBCC;
+#endif
+
+ extern unsigned char sha1LibRS[20];
extern char const *pathLibRS;
void calcSHA1(unsigned char *result, char const *data, size_t size);