X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Flikely%2F_info;h=ac43cc2b1a943702c80844f01ffbdb1c5079a751;hp=252169b362c8bf21ef9e21530df1b58db8e983d8;hb=8a83d6d131babba276fb602648f88b9e7e00cf58;hpb=cf4e2150325ebab7798c23110d80ff52467b4fc7 diff --git a/ccan/likely/_info b/ccan/likely/_info index 252169b3..ac43cc2b 100644 --- a/ccan/likely/_info +++ b/ccan/likely/_info @@ -9,6 +9,9 @@ * help you annotate rare paths in your code for the convenience of the * compiler and the reader. * + * With CCAN_LIKELY_DEBUG defined, it provides statistics for each + * likely()/unlikely() call. + * * License: LGPL (v2.1 or any later version) * Author: Rusty Russell * @@ -35,11 +38,20 @@ int main(int argc, char *argv[]) return 1; if (strcmp(argv[1], "depends") == 0) { +#ifdef CCAN_LIKELY_DEBUG printf("ccan/str\n"); printf("ccan/htable\n"); printf("ccan/hash\n"); +#endif + return 0; + } + if (strcmp(argv[1], "testdepends") == 0) { +#ifndef CCAN_LIKELY_DEBUG + printf("ccan/str\n"); + printf("ccan/htable\n"); + printf("ccan/hash\n"); +#endif return 0; } - return 1; }