1 /* Copyright (c) 2015 Regents of the University of California
3 * Author: Brian Demsky <bdemsky@uci.edu>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
13 #include "threads-model.h"
16 /** @brief An execution point in a trace. These give an execution
17 * independent way of numbering steps in a trace.*/
19 typedef unsigned int execcount_t;
20 enum ExecPointType {EP_BRANCH, EP_COUNTER, EP_LOOP};
21 enum CompareResult {CR_BEFORE, CR_AFTER, CR_EQUALS, CR_INCOMPARABLE};
25 ExecPoint(int length, thread_id_t thread_id);
26 ExecPoint(ExecPoint * e);
30 void push(ExecPointType type, execcount_t value);
32 int getSize() {return (size>>1);}
33 CompareResult compare(const ExecPoint * ep) const;
34 thread_id_t get_tid() const {return tid;}
37 ExecPointType getType();
38 friend bool ExecPointEquals(ExecPoint *e1, ExecPoint * e2);
39 friend unsigned int ExecPointHash(ExecPoint *e1);
46 execcount_t * pairarray;
47 unsigned int hashvalue;
51 unsigned int ExecPointHash(ExecPoint *e);
52 bool ExecPointEquals(ExecPoint *e1, ExecPoint * e2);