summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Brown <matthew.brown.dev@gmail.com>2017-05-04 10:23:52 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-03-08 15:30:47 +1100
commit8d0f41e021b3475a411371cf87b81ae4af763eca (patch)
tree2b30d76a8efb0268fa71ee914db1f636285725c1
parent84186ef0944c9413262f0974ddab3fb1343ccfe8 (diff)
downloadtalos-skiboot-8d0f41e021b3475a411371cf87b81ae4af763eca.tar.gz
talos-skiboot-8d0f41e021b3475a411371cf87b81ae4af763eca.zip
gcov: Add gcov data struct to sysfs
Extracting the skiboot gcov data is currently a tedious process which involves taking a mem dump of skiboot and searching for the gcov_info struct. This patch adds the gcov struct to sysfs under /opal/exports. Allowing the data to be copied directly into userspace and processed. Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com> [stewart: refactor to dump out whole skiboot area, as gcov data is all over] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/gcov-profiling.c1
-rw-r--r--core/opal.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/core/gcov-profiling.c b/core/gcov-profiling.c
index 70707011..136f563f 100644
--- a/core/gcov-profiling.c
+++ b/core/gcov-profiling.c
@@ -89,7 +89,6 @@ void skiboot_gcov_done(void)
printf("GCOV: gcov_info_list at 0x%p\n", gcov_info_list);
}
-
void __gcov_merge_add(gcov_type *counters, unsigned int n_counters)
{
(void)counters;
diff --git a/core/opal.c b/core/opal.c
index c5305282..9bf2ad84 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -347,6 +347,10 @@ static void add_opal_firmware_exports_node(struct dt_node *node)
dt_add_property_u64s(exports, "symbol_map", sym_start, sym_size);
dt_add_property_u64s(exports, "hdat_map", SPIRA_HEAP_BASE,
SPIRA_HEAP_SIZE);
+#ifdef SKIBOOT_GCOV
+ dt_add_property_u64s(exports, "gcov", SKIBOOT_BASE,
+ HEAP_BASE - SKIBOOT_BASE);
+#endif
}
static void add_opal_firmware_node(void)
OpenPOWER on IntegriCloud