*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Parts of this file were imported from Jens Axboe's blktrace sources (also GPL)
*/
char name[0];
};
-#define MINORBITS 20
-#define MINORMASK ((1 << MINORBITS) - 1)
-#define SECONDS(x) ((unsigned long long)(x) / 1000000000)
-#define NANO_SECONDS(x) ((unsigned long long)(x) % 1000000000)
-#define DOUBLE_TO_NANO_ULL(d) ((unsigned long long)((d) * 1000000000))
-#define CHECK_MAGIC(t) (((t)->magic & 0xffffff00) == BLK_IO_TRACE_MAGIC)
+u64 get_record_time(struct trace *trace)
+{
+ return trace->io->time;
+}
void init_io_hash_table(void)
{
gld = writes_gld;
seconds = SECONDS(io->time);
- if (seconds > gld->max_seconds)
- return;
-
gld->data[seconds].sum += io->bytes;
gld->data[seconds].count = 1;
void add_pending_io(struct trace *trace, struct graph_line_data *gld)
{
- int seconds;
+ unsigned int seconds;
struct blk_io_trace *io = trace->io;
int action = io->action & BLK_TA_MASK;
double avg;
if (action != __BLK_TA_ISSUE)
return;
- seconds = SECONDS(io->time);
- if (seconds > gld->max_seconds)
- return;
-
pio = hash_dispatched_io(trace->io);
if (!pio)
return;
ios_in_flight++;
+ seconds = SECONDS(io->time);
gld->data[seconds].sum += ios_in_flight;
gld->data[seconds].count++;
return;
seconds = SECONDS(io->time);
- if (seconds > gld->max_seconds)
- return;
-
gld->data[seconds].sum += 1;
gld->data[seconds].count = 1;
if (gld->data[seconds].sum > gld->max)