]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Enable using Tile cycle counter.
authorKen Steele <ken@tilera.com>
Tue, 27 Aug 2013 21:04:07 +0000 (17:04 -0400)
committerVictor Julien <victor@inliniac.net>
Thu, 29 Aug 2013 10:26:16 +0000 (12:26 +0200)
The Tile processors all have a cycle counter with a simple interface. Use
that for UtilCpuGetTicks.

src/util-cpu.c

index 18cc12151f2ef76f6799b60a16fc1d913d661177..c8559533a9952caf13711459f75c7752c9324573 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2010 Open Information Security Foundation
+/* Copyright (C) 2007-2013 Open Information Security Foundation
  *
  * You can copy, redistribute or modify this Program under the terms of
  * the GNU General Public License version 2 as published by the Free
@@ -175,6 +175,13 @@ void UtilCpuPrintSummary() {
  * \todo We'll have to deal with removig ticks from the extra cpuids inbetween
  *       2 calls.
  */
+#if defined(__tile__)
+#include <arch/cycle.h>
+uint64_t UtilCpuGetTicks(void)
+{
+  return get_cycle_count();
+}
+#else
 uint64_t UtilCpuGetTicks(void)
 {
     uint64_t val;
@@ -217,3 +224,4 @@ uint64_t UtilCpuGetTicks(void)
 #endif
     return val;
 }
+#endif /* __tile__ */