From: Peter O. <obe...@us...> - 2005-06-14 12:35:03
|
Update of /cvsroot/ltp/utils/analysis/gcov-kernel/base/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv301/base/include/linux Modified Files: gcov.h Log Message: gcov-kernel: - Added support for modified gcc-versions (hammer patch) as found in SLES9, Mandrake 10 Index: gcov.h =================================================================== RCS file: /cvsroot/ltp/utils/analysis/gcov-kernel/base/include/linux/gcov.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gcov.h 2 Jul 2004 11:57:04 -0000 1.2 --- gcov.h 14 Jun 2005 12:34:48 -0000 1.3 *************** *** 34,39 **** --- 34,42 ---- (__GNUC__ == major) && \ (__GNUC_MINOR__ < minor)) + #define GCC_VERSION_EQUAL(major, minor) (__GNUC__ == major) && \ + (__GNUC_MINOR__ == minor) #if GCC_VERSION_LOWER(3, 1) + /* * Profiling types for GCC prior to version 3.1 *************** *** 59,62 **** --- 62,66 ---- #elif GCC_VERSION_LOWER(3, 3) + /* * Profiling types for GCC 3.1 to 3.2 *************** *** 85,91 **** }; #elif GCC_VERSION_LOWER(3, 4) /* ! * Profiling types for GCC 3.3 */ --- 89,147 ---- }; + #elif GCC_VERSION_EQUAL(3, 3) && CONFIG_GCOV_HAMMER + + /* + * Profiling types for modified GCC 3.3 (hammer patch) + */ + + #define GCOV_DATA_MAGIC 0x67636f76 + #define GCOV_TAG_FUNCTION 0x01000000 + + + #if BITS_PER_LONG >= 64 + typedef long gcov_type; + #else + typedef long long gcov_type; + #endif + + struct counter_section + { + unsigned int tag; + unsigned int n_counters; + }; + + struct counter_section_data + { + unsigned int tag; + unsigned int n_counters; + gcov_type *counters; + }; + + struct function_info + { + const char *name; + unsigned int checksum; + unsigned int n_counter_sections; + const struct counter_section *counter_sections; + }; + + struct bb /* should be 'struct gcov_info' but we're sticking with the old name + * so we can reuse some of our pre-3.4 functions */ + { + unsigned long version; + struct bb *next; + const char *filename; + long wkspc; + unsigned int n_functions; + const struct function_info *functions; + unsigned int n_counter_sections; + const struct counter_section_data *counter_sections; + }; + + extern unsigned long gcov_version; #elif GCC_VERSION_LOWER(3, 4) + /* ! * Profiling types for vanilla GCC 3.3 */ *************** *** 111,115 **** }; ! #else /* * Profiling types for GCC 3.4 and above (see gcc-3.4/gcc/gcov-io.h) --- 167,172 ---- }; ! #else /* GCC_VERSION */ ! /* * Profiling types for GCC 3.4 and above (see gcc-3.4/gcc/gcov-io.h) |