summaryrefslogtreecommitdiffstats
path: root/sys/contrib/octeon-sdk/cvmx-log.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/octeon-sdk/cvmx-log.h')
-rw-r--r--sys/contrib/octeon-sdk/cvmx-log.h157
1 files changed, 39 insertions, 118 deletions
diff --git a/sys/contrib/octeon-sdk/cvmx-log.h b/sys/contrib/octeon-sdk/cvmx-log.h
index 8b6e4c5..87fb61c 100644
--- a/sys/contrib/octeon-sdk/cvmx-log.h
+++ b/sys/contrib/octeon-sdk/cvmx-log.h
@@ -1,45 +1,47 @@
/***********************license start***************
- * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
- * reserved.
- *
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * * Neither the name of Cavium Networks nor the names of
- * its contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
- * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
- * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
- * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
- * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
- * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
- * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
- * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
- * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT
- * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
- *
- *
- * For any questions regarding licensing please contact marketing@caviumnetworks.com
- *
+ * Copyright (c) 2003-2010 Cavium Networks (support@cavium.com). All rights
+ * reserved.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+
+ * * Neither the name of Cavium Networks nor the names of
+ * its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written
+ * permission.
+
+ * This Software, including technical data, may be subject to U.S. export control
+ * laws, including the U.S. Export Administration Act and its associated
+ * regulations, and may be subject to export or import regulations in other
+ * countries.
+
+ * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+ * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR
+ * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
+ * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
+ * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
+ * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
+ * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
+ * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
+ * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR
+ * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
***********************license end**************************************/
+
#ifndef __CVMX_LOG_H__
#define __CVMX_LOG_H__
@@ -50,94 +52,13 @@
* log data to a differnet buffer to avoid synchronization overhead. Function
* call logging can be turned on with the GCC option "-pg".
*
- * <hr>$Revision: 41586 $<hr>
+ * <hr>$Revision: 49448 $<hr>
*/
#ifdef __cplusplus
extern "C" {
#endif
-/**
- * Enumeration of all supported performance counter types
- */
-typedef enum
-{
- CVMX_LOG_PERF_CNT_NONE = 0, /**< Turn off the performance counter */
- CVMX_LOG_PERF_CNT_CLK = 1, /**< Conditionally clocked cycles (as opposed to count/cvm_count which count even with no clocks) */
- CVMX_LOG_PERF_CNT_ISSUE = 2, /**< Instructions issued but not retired */
- CVMX_LOG_PERF_CNT_RET = 3, /**< Instructions retired */
- CVMX_LOG_PERF_CNT_NISSUE = 4, /**< Cycles no issue */
- CVMX_LOG_PERF_CNT_SISSUE = 5, /**< Cycles single issue */
- CVMX_LOG_PERF_CNT_DISSUE = 6, /**< Cycles dual issue */
- CVMX_LOG_PERF_CNT_IFI = 7, /**< Cycle ifetch issued (but not necessarily commit to pp_mem) */
- CVMX_LOG_PERF_CNT_BR = 8, /**< Branches retired */
- CVMX_LOG_PERF_CNT_BRMIS = 9, /**< Branch mispredicts */
- CVMX_LOG_PERF_CNT_J = 10, /**< Jumps retired */
- CVMX_LOG_PERF_CNT_JMIS = 11, /**< Jumps mispredicted */
- CVMX_LOG_PERF_CNT_REPLAY = 12, /**< Mem Replays */
- CVMX_LOG_PERF_CNT_IUNA = 13, /**< Cycles idle due to unaligned_replays */
- CVMX_LOG_PERF_CNT_TRAP = 14, /**< trap_6a signal */
- CVMX_LOG_PERF_CNT_UULOAD = 16, /**< Unexpected unaligned loads (REPUN=1) */
- CVMX_LOG_PERF_CNT_UUSTORE = 17, /**< Unexpected unaligned store (REPUN=1) */
- CVMX_LOG_PERF_CNT_ULOAD = 18, /**< Unaligned loads (REPUN=1 or USEUN=1) */
- CVMX_LOG_PERF_CNT_USTORE = 19, /**< Unaligned store (REPUN=1 or USEUN=1) */
- CVMX_LOG_PERF_CNT_EC = 20, /**< Exec clocks(must set CvmCtl[DISCE] for accurate timing) */
- CVMX_LOG_PERF_CNT_MC = 21, /**< Mul clocks(must set CvmCtl[DISCE] for accurate timing) */
- CVMX_LOG_PERF_CNT_CC = 22, /**< Crypto clocks(must set CvmCtl[DISCE] for accurate timing) */
- CVMX_LOG_PERF_CNT_CSRC = 23, /**< Issue_csr clocks(must set CvmCtl[DISCE] for accurate timing) */
- CVMX_LOG_PERF_CNT_CFETCH = 24, /**< Icache committed fetches (demand+prefetch) */
- CVMX_LOG_PERF_CNT_CPREF = 25, /**< Icache committed prefetches */
- CVMX_LOG_PERF_CNT_ICA = 26, /**< Icache aliases */
- CVMX_LOG_PERF_CNT_II = 27, /**< Icache invalidates */
- CVMX_LOG_PERF_CNT_IP = 28, /**< Icache parity error */
- CVMX_LOG_PERF_CNT_CIMISS = 29, /**< Cycles idle due to imiss (must set CvmCtl[DISCE] for accurate timing) */
- CVMX_LOG_PERF_CNT_WBUF = 32, /**< Number of write buffer entries created */
- CVMX_LOG_PERF_CNT_WDAT = 33, /**< Number of write buffer data cycles used (may need to set CvmCtl[DISCE] for accurate counts) */
- CVMX_LOG_PERF_CNT_WBUFLD = 34, /**< Number of write buffer entries forced out by loads */
- CVMX_LOG_PERF_CNT_WBUFFL = 35, /**< Number of cycles that there was no available write buffer entry (may need to set CvmCtl[DISCE] and CvmMemCtl[MCLK] for accurate counts) */
- CVMX_LOG_PERF_CNT_WBUFTR = 36, /**< Number of stores that found no available write buffer entries */
- CVMX_LOG_PERF_CNT_BADD = 37, /**< Number of address bus cycles used (may need to set CvmCtl[DISCE] for accurate counts) */
- CVMX_LOG_PERF_CNT_BADDL2 = 38, /**< Number of address bus cycles not reflected (i.e. destined for L2) (may need to set CvmCtl[DISCE] for accurate counts) */
- CVMX_LOG_PERF_CNT_BFILL = 39, /**< Number of fill bus cycles used (may need to set CvmCtl[DISCE] for accurate counts) */
- CVMX_LOG_PERF_CNT_DDIDS = 40, /**< Number of Dstream DIDs created */
- CVMX_LOG_PERF_CNT_IDIDS = 41, /**< Number of Istream DIDs created */
- CVMX_LOG_PERF_CNT_DIDNA = 42, /**< Number of cycles that no DIDs were available (may need to set CvmCtl[DISCE] and CvmMemCtl[MCLK] for accurate counts) */
- CVMX_LOG_PERF_CNT_LDS = 43, /**< Number of load issues */
- CVMX_LOG_PERF_CNT_LMLDS = 44, /**< Number of local memory load */
- CVMX_LOG_PERF_CNT_IOLDS = 45, /**< Number of I/O load issues */
- CVMX_LOG_PERF_CNT_DMLDS = 46, /**< Number of loads that were not prefetches and missed in the cache */
- CVMX_LOG_PERF_CNT_STS = 48, /**< Number of store issues */
- CVMX_LOG_PERF_CNT_LMSTS = 49, /**< Number of local memory store issues */
- CVMX_LOG_PERF_CNT_IOSTS = 50, /**< Number of I/O store issues */
- CVMX_LOG_PERF_CNT_IOBDMA = 51, /**< Number of IOBDMAs */
- CVMX_LOG_PERF_CNT_DTLB = 53, /**< Number of dstream TLB refill, invalid, or modified exceptions */
- CVMX_LOG_PERF_CNT_DTLBAD = 54, /**< Number of dstream TLB address errors */
- CVMX_LOG_PERF_CNT_ITLB = 55, /**< Number of istream TLB refill, invalid, or address error exceptions */
- CVMX_LOG_PERF_CNT_SYNC = 56, /**< Number of SYNC stall cycles (may need to set CvmCtl[DISCE] for accurate counts) */
- CVMX_LOG_PERF_CNT_SYNCIOB = 57, /**< Number of SYNCIOBDMA stall cycles (may need to set CvmCtl[DISCE] for accurate counts) */
- CVMX_LOG_PERF_CNT_SYNCW = 58, /**< Number of SYNCWs */
-} cvmx_log_perf_event_t;
-
-/**
- * Structure of the performance counter control register
- */
-typedef union
-{
- uint32_t u32;
- struct
- {
- uint32_t M : 1;
- uint32_t W : 1;
- uint32_t reserved: 19;
- cvmx_log_perf_event_t event : 6;
- uint32_t IE : 1;
- uint32_t U : 1;
- uint32_t S : 1;
- uint32_t K : 1;
- uint32_t EX : 1;
- } s;
-} cvmx_log_perf_control_t;
-
/*
* Add CVMX_LOG_DISABLE_PC_LOGGING as an attribute to and function prototype
* that you don't want logged when the gcc option "-pg" is supplied. We
@@ -193,7 +114,7 @@ void cvmx_log_structure(const char *type, void *data, int size_in_bytes) CVMX_LO
* @param counter1 Event type for counter 1
* @param counter2 Event type for counter 2
*/
-void cvmx_log_perf_setup(cvmx_log_perf_event_t counter1, cvmx_log_perf_event_t counter2);
+void cvmx_log_perf_setup(cvmx_core_perf_t counter1, cvmx_core_perf_t counter2);
/**
* Log the performance counters
OpenPOWER on IntegriCloud