aboutsummaryrefslogtreecommitdiff
path: root/include/trace_types.h
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2019-04-02 10:43:22 +1100
committerStewart Smith <stewart@linux.ibm.com>2019-05-20 14:21:50 +1000
commit3f61c832bf1f973546b8dcb577fba4ece04cb5dc (patch)
tree5fbb5bc8e6afc4edfbee9666ad5d9a32e460b950 /include/trace_types.h
parent8c4763094cb87d34c595b2b911a5b26fc32360e7 (diff)
downloadskiboot-3f61c832bf1f973546b8dcb577fba4ece04cb5dc.zip
skiboot-3f61c832bf1f973546b8dcb577fba4ece04cb5dc.tar.gz
skiboot-3f61c832bf1f973546b8dcb577fba4ece04cb5dc.tar.bz2
external/trace: Introduce structure for reading traces
Currently the trace_get and trace_empty functions operate on a tracebuf struct. This requires being able to write to that struct. If dump_trace were able to use these functions it would be convenient as it would reduce code duplication and these functions are already unit tested. However, a tracebuf accessed via mmaping will not be able to be written. The tracebuf struct fields that need to be written are only to be used by a reader. The fields are never used by a writer. Add a new structure for readers, trace_reader, which contains these fields and remove them from the tracebuf struct. Change trace_get and trace_empty to use the trace_reader struct and update the unit tests accordingly. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include/trace_types.h')
-rw-r--r--include/trace_types.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/trace_types.h b/include/trace_types.h
index bcf668d..a525a00 100644
--- a/include/trace_types.h
+++ b/include/trace_types.h
@@ -36,10 +36,6 @@ struct tracebuf {
__be64 end;
/* This is where the writer wrote to previously. */
__be64 last;
- /* This is where the reader is up to. */
- __be64 rpos;
- /* If the last one we read was a repeat, this shows how many. */
- __be32 last_repeat;
/* Maximum possible size of a record. */
__be32 max_size;