diff options
author | Matt Brown <matthew.brown.dev@gmail.com> | 2017-05-04 10:23:52 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-03-08 15:30:47 +1100 |
commit | 8d0f41e021b3475a411371cf87b81ae4af763eca (patch) | |
tree | 2b30d76a8efb0268fa71ee914db1f636285725c1 /core/opal.c | |
parent | 84186ef0944c9413262f0974ddab3fb1343ccfe8 (diff) | |
download | skiboot-8d0f41e021b3475a411371cf87b81ae4af763eca.zip skiboot-8d0f41e021b3475a411371cf87b81ae4af763eca.tar.gz skiboot-8d0f41e021b3475a411371cf87b81ae4af763eca.tar.bz2 |
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>
Diffstat (limited to 'core/opal.c')
-rw-r--r-- | core/opal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/opal.c b/core/opal.c index c530528..9bf2ad8 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) |