aboutsummaryrefslogtreecommitdiff
path: root/core/gcov-profiling.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:11:43 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-15 07:59:18 +1000
commit2b9fdc7a27b2199830dd9f245eff92d506cc9bf9 (patch)
tree634e348ab1c8da4dca8c6961f2d4942267cf8fdb /core/gcov-profiling.c
parent4fed073fd02ae24c1e3f099e20bed623ac00df2e (diff)
downloadskiboot-2b9fdc7a27b2199830dd9f245eff92d506cc9bf9.zip
skiboot-2b9fdc7a27b2199830dd9f245eff92d506cc9bf9.tar.gz
skiboot-2b9fdc7a27b2199830dd9f245eff92d506cc9bf9.tar.bz2
Enable SKIBOOT_GCOV build option for building with profiling
Enable build options for building skiboot with GCOV profiling, including a skeleton -lgcov replacement in the form of core/gcov-profiling.c We don't actually have to do anything as part of the gcov routines, gcov auto generates everything we need. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/gcov-profiling.c')
-rw-r--r--core/gcov-profiling.c76
1 files changed, 76 insertions, 0 deletions
diff --git a/core/gcov-profiling.c b/core/gcov-profiling.c
new file mode 100644
index 0000000..453ae7f
--- /dev/null
+++ b/core/gcov-profiling.c
@@ -0,0 +1,76 @@
+/* Copyright 2013-2014 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <compiler.h>
+
+typedef long gcov_type;
+
+void __gcov_init(void* f) __attrconst;
+void __gcov_flush(void) __attrconst;
+void __gcov_merge_add(gcov_type *counters, unsigned int n_counters) __attrconst;
+void __gcov_merge_single(gcov_type *counters, unsigned int n_counters) __attrconst;
+void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters) __attrconst;
+void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters) __attrconst;
+void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters) __attrconst;
+
+void __gcov_init(void* f)
+{
+ (void)f;
+
+ return;
+}
+
+void __gcov_merge_add(gcov_type *counters, unsigned int n_counters)
+{
+ (void)counters;
+ (void)n_counters;
+
+ return;
+}
+
+void __gcov_flush(void)
+{
+ return;
+}
+
+void __gcov_merge_single(gcov_type *counters, unsigned int n_counters)
+{
+ (void)counters;
+ (void)n_counters;
+
+ return;
+}
+
+void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters)
+{
+ (void)counters;
+ (void)n_counters;
+
+ return;
+}
+
+void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters)
+{
+ (void)counters;
+ (void)n_counters;
+ return;
+}
+
+void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters)
+{
+ (void)counters;
+ (void)n_counters;
+}