d09da7e65daa55b06a686edd3f19c24decd76b1a
[lttv.git] /
1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2005 Peter Ho
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
16 * MA 02111-1307, USA.
17 */
18
19
20 #include <math.h>
21
22 #include <glib.h>
23 #include <gtk/gtk.h>
24 #include <gdk/gdk.h>
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include <ltt/ltt.h>
29 #include <ltt/event.h>
30 #include <ltt/trace.h>
31 #include <lttv/module.h>
32 #include <lttv/hook.h>
33 #include <lttv/tracecontext.h>
34 #include <lttv/state.h>
35 #include <lttv/filter.h>
36 #include <lttvwindow/lttvwindow.h>
37 #include <lttvwindow/lttv_plugin_tab.h>
38 #include <ltt/time.h>
39
40 #include "hDiskPerformanceInsert.xpm"
41
42
43 #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
44 #define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
45 // fixed #define TRACE_NUMBER 0
46 #define NO_ITEMS 0
47
48 enum{
49 DISKNAME_COLUMN,
50 BYTES_RD_COLUMN,
51 BYTES_RD_SEC_COLUMN,
52 NUM_RD_COLUMN,
53 BYTES_WR_COLUMN,
54 BYTES_WR_SEC_COLUMN,
55 NUM_WR_COLUMN,
56 N_COLUMNS
57 };
58
59 enum operation_t {
60 LTTV_READ_OPERATION = 1,
61 LTTV_WRITE_OPERATION
62 };
63
64 typedef struct _DiskPerformanceData {
65
66 Tab * tab;
67
68 LttvPluginTab *ptab;
69
70 LttvHooks * hooks_trace_after;
71
72 LttvHooks * hooks_trace_before;
73 /* time window */
74 TimeWindow time_window;
75
76 GtkWidget * scroll_win;
77
78 /* Model containing list data */
79 GtkListStore *store_m;
80
81 GtkWidget *hbox_v;
82
83 /* Widget to display the data in a columned list */
84 GtkWidget *tree_v;
85
86 /* Selection handler */
87 GtkTreeSelection *select_c;
88
89 GArray *disk_array;
90
91 LttvHooksById * event_by_id_hooks;
92
93 } DiskPerformanceData;
94
95
96 typedef struct _lttv_block {
97 guint major_number;
98 guint minor_number;
99 guint size;
100 } lttv_block;
101
102 typedef struct _lttv_total_block {
103 char diskname[10];
104 guint64 total_bytes_read;
105 guint num_read_operations;
106 guint64 total_bytes_written;
107 guint num_write_operations;
108
109 } lttv_total_block;
110
111 GSList *g_disk_data_list = NULL ;
112
113
114
115 /* facility */
116 GQuark LTT_FACILITY_BLOCK;
117
118 /* events */
119 GQuark LTT_EVENT_BLOCK_READ;
120 GQuark LTT_EVENT_BLOCK_WRITE;
121
122 static DiskPerformanceData *disk_performance_data(LttvPluginTab *ptab);
123 static void disk_destroy_walk(gpointer data, gpointer user_data);
124 static gboolean disk_show(void *hook_data, void *call_data);
125 static gboolean trace_header(void *hook_data, void *call_data);
126 static gboolean disk_update_time_window(void * hook_data, void * call_data);
127 static void request_event( DiskPerformanceData *disk_performance);
128 void gui_disperformance_free(DiskPerformanceData *event_viewer_data);
129 static void get_event_detail(LttEvent *e, lttv_block* disk_data);
130 static char * major_minor_to_diskname( lttv_block* disk_data);
131 static void sum_data(char* diskname, guint size, enum operation_t opt, GArray *disk_array);
132 static GtkWidget *disk_performance(LttvPlugin *plugin);
133
134 static gboolean block_read_callback(void *hook_data, void *call_data);
135
136 static gboolean block_write_callback(void *hook_data, void *call_data);
137
138
139 static gboolean disk_show(void *hook_data, void *call_data){
140
141 guint i;
142 lttv_total_block element;
143 GtkTreeIter iter;
144 LttTime time_interval;
145 guint64 time_interval_64;
146 guint64 temp_variable;
147 guint64 bytes_read_per_sec, bytes_written_per_sec;
148 g_info(" diskperformance: disk_show() \n");
149 DiskPerformanceData *disk_performance = (DiskPerformanceData *)hook_data;
150 GArray *disk_array = disk_performance->disk_array;
151 time_interval = ltt_time_sub(disk_performance->time_window.end_time, disk_performance->time_window.start_time);
152
153 time_interval_64 = time_interval.tv_sec;
154 time_interval_64 *= NANOSECONDS_PER_SECOND;
155 time_interval_64 += time_interval.tv_nsec;
156 gtk_list_store_clear(disk_performance->store_m);
157 for(i = 0; i < disk_array->len; i++){
158
159 element = g_array_index(disk_array,lttv_total_block,i);
160 temp_variable = element.total_bytes_read * NANOSECONDS_PER_SECOND;
161 bytes_read_per_sec = (guint64) temp_variable / time_interval_64;
162
163 temp_variable = element.total_bytes_written * NANOSECONDS_PER_SECOND;
164 bytes_written_per_sec = (guint64) temp_variable / time_interval_64;
165
166 gtk_list_store_append (disk_performance->store_m, &iter);
167 gtk_list_store_set (disk_performance->store_m, &iter,
168 DISKNAME_COLUMN, element.diskname,
169 BYTES_RD_COLUMN, element.total_bytes_read,
170 BYTES_RD_SEC_COLUMN,bytes_read_per_sec,
171 NUM_RD_COLUMN, element.num_read_operations,
172 BYTES_WR_COLUMN, element.total_bytes_written,
173 BYTES_WR_SEC_COLUMN, bytes_written_per_sec,
174 NUM_WR_COLUMN, element.num_write_operations,
175 -1);
176
177 }
178 if(disk_performance->disk_array->len)
179 g_array_remove_range (disk_performance->disk_array,0,disk_performance->disk_array->len);
180 return FALSE;
181 }
182
183 static gboolean trace_header(void *hook_data, void *call_data){
184 return FALSE;
185 }
186
187
188 static gboolean disk_update_time_window(void * hook_data, void * call_data){
189
190 DiskPerformanceData *disk_performance = (DiskPerformanceData *) hook_data;
191 const TimeWindowNotifyData *time_window_nofify_data = ((const TimeWindowNotifyData *)call_data);
192 disk_performance->time_window = *time_window_nofify_data->new_time_window;
193 Tab *tab = disk_performance->tab;
194 lttvwindow_events_request_remove_all(tab, disk_performance);
195 request_event( disk_performance);
196
197
198 return FALSE;
199 }
200
201 void gui_disperformance_free(DiskPerformanceData *eventdata){
202 Tab *tab = eventdata->tab;
203 g_info("disperformance.c : gui_disperformance_free, %p", eventdata);
204 g_info("%p, %p", eventdata, tab);
205 if(tab != NULL)
206 {
207 g_array_free (eventdata->disk_array, TRUE);
208
209 lttvwindow_unregister_time_window_notify(tab,
210 disk_update_time_window,
211 eventdata);
212
213 lttvwindow_events_request_remove_all(eventdata->tab,
214 eventdata);
215 g_disk_data_list = g_slist_remove(g_disk_data_list, eventdata);
216 }
217 g_free(eventdata);
218 g_info("disperformance.c : gui_disperformance_free end, %p", eventdata);
219 }
220
221
222
223
224
225
226 void disk_destructor_full(DiskPerformanceData *disk_data)
227 {
228
229 if(GTK_IS_WIDGET(disk_data->hbox_v))
230 gtk_widget_destroy(disk_data->hbox_v);
231
232 }
233
234 static void disk_destroy_walk(gpointer data, gpointer user_data)
235 {
236 g_info("Walk destroy GUI disk performance Viewer");
237 disk_destructor_full((DiskPerformanceData*)data);
238 }
239 /**
240 * init function
241 *
242 *
243 * This is the entry point of the viewer.
244 *
245 */
246 static void init()
247 {
248
249 g_info("Init diskPerformance.c");
250
251 LTT_FACILITY_BLOCK = g_quark_from_string("block");
252 LTT_EVENT_BLOCK_READ = g_quark_from_string("read");
253 LTT_EVENT_BLOCK_WRITE = g_quark_from_string("write");
254
255 lttvwindow_register_constructor("diskperformance",
256 "/",
257 "Insert Disk Performance",
258 hDiskPerformanceInsert_xpm,
259 "Insert Disk Performance",
260 disk_performance);
261 }
262
263 /**
264 * Constructor hook
265 *
266 */
267 GtkWidget *disk_performance(LttvPlugin *plugin)
268 {
269 LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin);
270 DiskPerformanceData* disk_data = disk_performance_data(ptab);
271 if(disk_data)
272 return disk_data->hbox_v;
273 else
274 return NULL;
275 }
276
277 /**
278 * This function initializes the Event Viewer functionnality through the
279 * GTK API.
280 */
281 DiskPerformanceData *disk_performance_data(LttvPluginTab *ptab)
282 {
283 LttTime end;
284 GtkTreeViewColumn *column;
285 GtkCellRenderer *renderer;
286 DiskPerformanceData* disk_data = g_new(DiskPerformanceData,1) ;
287
288 g_info("enter disk_performance_data \n");
289 Tab *tab = ptab->tab;
290 disk_data->tab = tab;
291 disk_data->ptab = ptab;
292 disk_data->time_window = lttvwindow_get_time_window(tab);
293
294 disk_data->disk_array = g_array_new(FALSE, FALSE, sizeof(lttv_total_block ));
295
296 lttvwindow_register_time_window_notify(tab,
297 disk_update_time_window,
298 disk_data);
299
300 disk_data->scroll_win = gtk_scrolled_window_new (NULL, NULL);
301 gtk_widget_show (disk_data->scroll_win);
302 gtk_scrolled_window_set_policy(
303 GTK_SCROLLED_WINDOW(disk_data->scroll_win),
304 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
305
306 /* Create a model for storing the data list */
307 disk_data->store_m = gtk_list_store_new (
308 N_COLUMNS, /* Total number of columns */
309 G_TYPE_STRING, /* Diskname */
310 G_TYPE_INT64, /* Bytes read */
311 G_TYPE_INT64, /* Bytes read/sec */
312 G_TYPE_INT,
313 G_TYPE_INT64, /* bytes written */
314 G_TYPE_INT64, /* bytes written/sec */
315 G_TYPE_INT
316 );
317
318 disk_data->tree_v = gtk_tree_view_new_with_model (GTK_TREE_MODEL (disk_data->store_m));
319
320 g_object_unref (G_OBJECT (disk_data->store_m));
321
322 renderer = gtk_cell_renderer_text_new ();
323
324 column = gtk_tree_view_column_new_with_attributes ("DiskName",
325 renderer,
326 "text", DISKNAME_COLUMN,
327 NULL);
328 gtk_tree_view_column_set_alignment (column, 0.0);
329 gtk_tree_view_column_set_fixed_width (column, 45);
330 gtk_tree_view_append_column (GTK_TREE_VIEW (disk_data->tree_v), column);
331
332 renderer = gtk_cell_renderer_text_new ();
333 column = gtk_tree_view_column_new_with_attributes ("BytesRead",
334 renderer,
335 "text", BYTES_RD_COLUMN,
336 NULL);
337 gtk_tree_view_column_set_alignment (column, 0.0);
338 gtk_tree_view_column_set_fixed_width (column, 220);
339 gtk_tree_view_append_column (GTK_TREE_VIEW (disk_data->tree_v), column);
340
341 renderer = gtk_cell_renderer_text_new ();
342 column = gtk_tree_view_column_new_with_attributes ("BytesRead/sec",
343 renderer,
344 "text", BYTES_RD_SEC_COLUMN,
345 NULL);
346 gtk_tree_view_column_set_alignment (column, 1.0);
347 gtk_tree_view_column_set_fixed_width (column, 220);
348 gtk_tree_view_append_column (GTK_TREE_VIEW (disk_data->tree_v), column);
349
350 renderer = gtk_cell_renderer_text_new ();
351 column = gtk_tree_view_column_new_with_attributes ("NumReadOperations",
352 renderer,
353 "text",NUM_RD_COLUMN,
354 NULL);
355 gtk_tree_view_column_set_alignment (column, 1.0);
356 gtk_tree_view_column_set_fixed_width (column, 220);
357 gtk_tree_view_append_column (GTK_TREE_VIEW (disk_data->tree_v), column);
358
359 renderer = gtk_cell_renderer_text_new ();
360 column = gtk_tree_view_column_new_with_attributes ("BytesWritten",
361 renderer,
362 "text", BYTES_WR_COLUMN,
363 NULL);
364 gtk_tree_view_column_set_alignment (column, 0.0);
365 gtk_tree_view_column_set_fixed_width (column, 145);
366 gtk_tree_view_append_column (GTK_TREE_VIEW (disk_data->tree_v), column);
367
368 renderer = gtk_cell_renderer_text_new ();
369 column = gtk_tree_view_column_new_with_attributes ("BytesWritten/sec",
370 renderer,
371 "text", BYTES_WR_SEC_COLUMN,
372 NULL);
373 gtk_tree_view_column_set_alignment (column, 1.0);
374 gtk_tree_view_column_set_fixed_width (column, 220);
375 gtk_tree_view_append_column (GTK_TREE_VIEW (disk_data->tree_v), column);
376
377 renderer = gtk_cell_renderer_text_new ();
378 column = gtk_tree_view_column_new_with_attributes ("NumWriteOperations",
379 renderer,
380 "text",NUM_WR_COLUMN,
381 NULL);
382 gtk_tree_view_column_set_alignment (column, 0.0);
383 gtk_tree_view_column_set_fixed_width (column, 145);
384 gtk_tree_view_append_column (GTK_TREE_VIEW (disk_data->tree_v), column);
385
386 disk_data->select_c = gtk_tree_view_get_selection (GTK_TREE_VIEW (disk_data->tree_v));
387 gtk_tree_selection_set_mode (disk_data->select_c, GTK_SELECTION_SINGLE);
388
389 gtk_container_add (GTK_CONTAINER (disk_data->scroll_win), disk_data->tree_v);
390
391 disk_data->hbox_v = gtk_hbox_new(0, 0);
392 gtk_box_pack_start(GTK_BOX(disk_data->hbox_v), disk_data->scroll_win, TRUE, TRUE, 0);
393
394 gtk_widget_show(disk_data->hbox_v);
395 gtk_widget_show(disk_data->tree_v);
396
397
398 g_disk_data_list = g_slist_append(g_disk_data_list, disk_data);
399 g_object_set_data_full(G_OBJECT(disk_data->hbox_v),
400 "disk_data",
401 disk_data,
402 (GDestroyNotify)gui_disperformance_free);
403
404 request_event(disk_data);
405 return disk_data;
406 }
407
408 /**
409 *
410 * For each trace in the traceset, this function:
411 * - calls lttv_trace_find_hook() & registers a hook function to event_by_id_hooks
412 * - registers a callback function to each hook
413 * - calls lttvwindow_events_request() to request data in a specific
414 * time interval to the main window
415 *
416 */
417 static void request_event(DiskPerformanceData *disk_performance)
418 {
419 guint i, k, l, nb_trace;
420
421 GArray *hooks;
422
423 guint ret;
424
425 LttvTraceHook *hook;
426
427 LttvTraceState *ts;
428
429 LttvTraceHookByFacility *thf;
430
431 LttvTracesetContext *tsc = lttvwindow_get_traceset_context(disk_performance->tab);
432 /* Get the traceset */
433 LttvTraceset *traceset = tsc->ts;
434
435 nb_trace = lttv_traceset_number(traceset);
436
437 //for(i = 0; i<MIN(TRACE_NUMBER+1, nb_trace);i++) {
438 for(i = 0 ; i < nb_trace ; i++) {
439 EventsRequest *events_request = g_new(EventsRequest, 1);
440
441 hooks = g_array_new(FALSE, FALSE, sizeof(LttvTraceHook));
442
443 hooks = g_array_set_size(hooks, 2);
444
445 /* Get a trace state */
446 ts = (LttvTraceState *)tsc->traces[i];
447
448 disk_performance->event_by_id_hooks = lttv_hooks_by_id_new();
449 /* Register event_by_id_hooks with a callback function */
450 ret = lttv_trace_find_hook(ts->parent.t,
451 LTT_FACILITY_BLOCK, LTT_EVENT_BLOCK_READ,
452 0, 0, 0,
453 block_read_callback,
454 disk_performance,
455 &g_array_index(hooks, LttvTraceHook, 0));
456
457 ret = lttv_trace_find_hook(ts->parent.t,
458 LTT_FACILITY_BLOCK, LTT_EVENT_BLOCK_WRITE,
459 0, 0, 0,
460 block_write_callback,
461 disk_performance,
462 &g_array_index(hooks, LttvTraceHook, 1));
463
464 g_assert(!ret);
465
466 /*iterate through the facility list*/
467 for(k = 0 ; k < hooks->len; k++)
468 {
469 hook = &g_array_index(hooks, LttvTraceHook, k);
470 for(l=0; l<hook->fac_list->len; l++)
471 {
472 thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
473 lttv_hooks_add(lttv_hooks_by_id_find(disk_performance->event_by_id_hooks, thf->id),
474 thf->h,
475 disk_performance,
476 LTTV_PRIO_DEFAULT);
477
478 }
479 }
480
481 disk_performance->hooks_trace_after = lttv_hooks_new();
482 /* Registers a hook function */
483 lttv_hooks_add(disk_performance->hooks_trace_after, disk_show, disk_performance, LTTV_PRIO_DEFAULT);
484
485 disk_performance->hooks_trace_before = lttv_hooks_new();
486 /* Registers a hook function */
487 lttv_hooks_add(disk_performance->hooks_trace_before, trace_header, disk_performance, LTTV_PRIO_DEFAULT);
488
489 /* Initalize the EventsRequest structure */
490 events_request->owner = disk_performance;
491 events_request->viewer_data = disk_performance;
492 events_request->servicing = FALSE;
493 events_request->start_time = disk_performance->time_window.start_time;
494 events_request->start_position = NULL;
495 events_request->stop_flag = FALSE;
496 events_request->end_time = disk_performance->time_window.end_time;
497 events_request->num_events = G_MAXUINT;
498 events_request->end_position = NULL;
499 events_request->trace = i;
500 events_request->hooks = hooks;
501 events_request->before_chunk_traceset = NULL;
502 events_request->before_chunk_trace = disk_performance->hooks_trace_before;
503 events_request->before_chunk_tracefile= NULL;
504 events_request->event = NULL;
505 events_request->event_by_id = disk_performance->event_by_id_hooks;
506 events_request->after_chunk_tracefile = NULL;
507 events_request->after_chunk_trace = NULL;
508 events_request->after_chunk_traceset = NULL;
509 events_request->before_request = NULL;
510 events_request->after_request = disk_performance->hooks_trace_after;
511
512 lttvwindow_events_request(disk_performance->tab, events_request);
513 }
514
515 }
516
517 /**
518 * This function is called whenever a read event occurs.
519 *
520 */
521 static gboolean block_read_callback(void *hook_data, void *call_data)
522 {
523 LttEvent *e;
524 LttTime event_time;
525 unsigned cpu_id;
526 lttv_block block_read;
527 char *diskname;
528
529 LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
530 LttvTracefileState *tfs = (LttvTracefileState *)call_data;
531 DiskPerformanceData *disk_performance = (DiskPerformanceData *)hook_data;
532 GArray *disk_array = disk_performance->disk_array;
533 e = ltt_tracefile_get_event(tfc->tf);
534 event_time = ltt_event_time(e);
535 cpu_id = ltt_event_cpu_id(e);
536
537 get_event_detail(e, &block_read);
538 diskname = major_minor_to_diskname(&block_read);
539 sum_data(diskname, block_read.size,LTTV_READ_OPERATION, disk_array);
540
541 return FALSE;
542 }
543
544 /**
545 * This function is called whenever a write event occurs.
546 *
547 */
548 static gboolean block_write_callback(void *hook_data, void *call_data)
549 {
550 LttEvent *e;
551 LttTime event_time;
552 unsigned cpu_id;
553 lttv_block block_write;
554 char *diskname;
555 LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
556 LttvTracefileState *tfs = (LttvTracefileState *)call_data;
557 DiskPerformanceData *disk_performance = (DiskPerformanceData *)hook_data;
558 GArray *disk_array = disk_performance->disk_array;
559 e = ltt_tracefile_get_event(tfc->tf);
560 event_time = ltt_event_time(e);
561 cpu_id = ltt_event_cpu_id(e);
562
563 get_event_detail(e, &block_write);
564 diskname = major_minor_to_diskname(&block_write);
565 sum_data(diskname, block_write.size,LTTV_WRITE_OPERATION, disk_array);
566
567 return FALSE;
568 }
569
570 /**
571 * This function extracts the major, minor and size
572 *
573 */
574 static void get_event_detail(LttEvent *e, lttv_block* disk_data)
575 {
576 guint i, num_fields;
577 LttEventType *event_type;
578 LttField *element;
579 LttField *field;
580 event_type = ltt_event_eventtype(e);
581 num_fields = ltt_eventtype_num_fields(event_type);
582
583 for(i = 0 ; i < num_fields ; i++)
584 {
585 element = ltt_eventtype_field(event_type,i);
586 switch(i)
587 {
588 case 0:
589 disk_data->major_number = ltt_event_get_long_unsigned(e, element);
590 break;
591
592 case 1:
593 disk_data->minor_number = ltt_event_get_long_unsigned(e, element);
594 break;
595 case 2:
596 disk_data->size = ltt_event_get_long_unsigned(e, element);
597 break;
598 }
599
600 }
601
602 }
603
604
605
606 /**
607 * This function calculates: the number of operations, the total bytes read or written,
608 * the average number of bytes read or written by sec.
609 */
610 static void sum_data(char* diskname, guint size, enum operation_t operation, GArray *disk_array)
611 {
612
613 lttv_total_block data;
614 lttv_total_block *element;
615 guint i;
616 gboolean notFound = FALSE;
617
618 memset ((void*)&data, 0,sizeof(lttv_total_block));
619
620 if(disk_array->len == NO_ITEMS){
621 strcpy(data.diskname, diskname);
622 if(operation == LTTV_READ_OPERATION){
623 data.total_bytes_read = size;
624 data.num_read_operations++;
625 }
626 else{
627 data.total_bytes_written = size;
628 data.num_write_operations ++;
629 }
630 g_array_append_val (disk_array, data);
631 }
632 else{
633 for(i = 0; i < disk_array->len; i++){
634 element = &g_array_index(disk_array,lttv_total_block,i);
635 if(strcmp(element->diskname,diskname) == 0){
636 if(operation == LTTV_READ_OPERATION){
637 element->num_read_operations++;
638 element->total_bytes_read += size;
639 }
640 else{
641 element->num_write_operations ++;
642 element->total_bytes_written += size;
643 }
644 notFound = TRUE;
645 }
646 }
647 if(!notFound){
648 strcpy(data.diskname, diskname);
649 if(operation == LTTV_READ_OPERATION){
650 data.total_bytes_read = size;
651 data.num_read_operations ++;
652 }
653 else{
654 data.total_bytes_written = size;
655 data.num_write_operations ++;
656 }
657 g_array_append_val (disk_array, data);
658 }
659 }
660 }
661
662
663 static void destroy()
664 {
665 g_info("Destroy diskPerformance");
666 g_slist_foreach(g_disk_data_list, disk_destroy_walk, NULL );
667 g_slist_free(g_disk_data_list);
668
669 lttvwindow_unregister_constructor(disk_performance);
670
671 }
672
673 /**
674 * This function convert the major and minor number to the corresponding disk.
675 * Data taken from Documentation/devices.txt of the kernel tree.
676 */
677 static char * major_minor_to_diskname( lttv_block* disk_data)
678 {
679 switch(disk_data->major_number)
680 {
681 /* IDE Disks */
682 case 3: /* First MFM, RLL and IDE hard disk/CD-ROM interface */
683 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
684 return "/dev/hda";
685 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
686 return "/dev/hdb";
687 break;
688
689 case 22: /*Second IDE hard disk/CD-ROM interface */
690 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
691 return "/dev/hdc";
692 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
693 return "/dev/hdd";
694 break;
695
696 case 33: /* Third IDE hard disk/CD-ROM interface */
697 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
698 return "/dev/hde";
699 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
700 return "/dev/hdf";
701 break;
702
703 case 34: /* Fourth IDE hard disk/CD-ROM interface */
704 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
705 return "/dev/hdg";
706 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
707 return "/dev/hdh";
708 break;
709
710 case 56: /* Fifth IDE hard disk/CD-ROM interface */
711 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
712 return "/dev/hdi";
713 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
714 return "/dev/hdj";
715 break;
716
717 case 57: /* Sixth IDE hard disk/CD-ROM interface */
718 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
719 return "/dev/hdk";
720 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
721 return "/dev/hdl";
722 break;
723
724 case 88: /* Seventh IDE hard disk/CD-ROM interface */
725 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
726 return "/dev/hdm";
727 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
728 return "/dev/hdn";
729 break;
730
731 case 89: /* Eighth IDE hard disk/CD-ROM interface */
732 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
733 return "/dev/hdo";
734 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
735 return "/dev/hdp";
736 break;
737
738 case 90: /* Ninth IDE hard disk/CD-ROM interface */
739 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
740 return "/dev/hdq";
741 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
742 return "/dev/hdr";
743 break;
744
745 case 91: /* Tenth IDE hard disk/CD-ROM interface */
746 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 64))
747 return "/dev/hds";
748 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 128))
749 return "/dev/hdt";
750 break;
751
752 /* SCSI Disks */
753 case 8: /* SCSI disk devices */
754 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
755 return "/dev/sda"; // First SCSI disk whole disk
756
757 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
758 return "/dev/sdb";// Second SCSI disk whole disk
759
760 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
761 return "/dev/sdc";// Third SCSI disk whole disk
762
763 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
764 return "/dev/sdd";// Fourth SCSI disk whole disk
765
766 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
767 return "/dev/sde";// Fifth SCSI disk whole disk
768
769 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
770 return "/dev/sdf";// Sixth SCSI disk whole disk
771
772 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
773 return "/dev/sdg";// seventh SCSI disk whole disk
774
775 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
776 return "/dev/sdh";// eighth SCSI disk whole disk
777
778 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
779 return "/dev/sdi";// 9th SCSI disk whole disk
780
781 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
782 return "/dev/sdj";// 10th SCSI disk whole disk
783
784 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
785 return "/dev/sdk";// 11th SCSI disk whole disk
786
787 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
788 return "/dev/sdl";// 12th SCSI disk whole disk
789
790 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
791 return "/dev/sdm";// 13th SCSI disk whole disk
792
793 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
794 return "/dev/sdn";// 14th SCSI disk whole disk
795
796 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
797 return "/dev/sdo";// 15th SCSI disk whole disk
798
799 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
800 return "/dev/sdp";// 16th SCSI disk whole disk
801 break;
802
803 case 65: /* SCSI disk devices */
804 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
805 return "/dev/sdq";
806
807 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
808 return "/dev/sdr";
809
810 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
811 return "/dev/sds";
812
813 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
814 return "/dev/sdt";
815
816 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
817 return "/dev/sdu";
818
819 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
820 return "/dev/sdv";
821
822 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
823 return "/dev/sdw";
824
825 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
826 return "/dev/sdy";
827
828 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
829 return "/dev/sdx";
830
831 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
832 return "/dev/sdz";
833
834 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
835 return "/dev/sdaa";
836
837 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
838 return "/dev/sdab";
839
840 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
841 return "/dev/sdac";
842
843 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
844 return "/dev/sdad";
845
846 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
847 return "/dev/sdae";
848
849 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
850 return "/dev/sdaf";
851 break;
852
853 case 66: /* SCSI disk devices */
854 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
855 return "/dev/sdag";
856
857 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
858 return "/dev/sdah";
859
860 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
861 return "/dev/sdai";
862
863 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
864 return "/dev/sdaj";
865
866 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
867 return "/dev/sdak";
868
869 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
870 return "/dev/sdal";
871
872 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
873 return "/dev/sdam";
874
875 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
876 return "/dev/sdan";
877
878 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
879 return "/dev/sdao";
880
881 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
882 return "/dev/sdap";
883
884 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
885 return "/dev/sdaq";
886
887 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
888 return "/dev/sdar";
889
890 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
891 return "/dev/sdas";
892
893 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
894 return "/dev/sdat";
895
896 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
897 return "/dev/sdau";
898
899 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
900 return "/dev/sdav";
901 break;
902
903
904 case 67: /* SCSI disk devices */
905 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
906 return "/dev/sdaw";
907
908 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
909 return "/dev/sdax";
910
911 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
912 return "/dev/sday";
913
914 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
915 return "/dev/sdaz";
916
917 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
918 return "/dev/sdba";
919
920 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
921 return "/dev/sdbb";
922
923 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
924 return "/dev/sdbc";
925
926 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
927 return "/dev/sdbd";
928
929 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
930 return "/dev/sdbe";
931
932 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
933 return "/dev/sdbf";
934
935 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
936 return "/dev/sdbg";
937
938 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
939 return "/dev/sdbh";
940
941 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
942 return "/dev/sdbi";
943
944 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
945 return "/dev/sdbj";
946
947 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
948 return "/dev/sdbk";
949
950 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
951 return "/dev/sdbl";
952 break;
953
954 case 68 : /* SCSI disk devices */
955 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
956 return "/dev/sdbm";
957
958 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
959 return "/dev/sdbm";
960
961 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
962 return "/dev/sdbo";
963
964 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
965 return "/dev/sdbp";
966
967 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
968 return "/dev/sdbq";
969
970 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
971 return "/dev/sdbr";
972
973 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
974 return "/dev/sdbs";
975
976 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
977 return "/dev/sdbt";
978
979 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
980 return "/dev/sdbu";
981
982 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
983 return "/dev/sdbv";
984
985 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
986 return "/dev/sdbw";
987
988 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
989 return "/dev/sdbx";
990
991 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
992 return "/dev/sdby";
993
994 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
995 return "/dev/sdbz";
996
997 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
998 return "/dev/sdca";
999
1000 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
1001 return "/dev/sdcb";
1002 break;
1003 case 69 : /* SCSI disk devices */
1004 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
1005 return "/dev/sdcc";
1006
1007 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
1008 return "/dev/sdcd";
1009
1010 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
1011 return "/dev/sdce";
1012
1013 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
1014 return "/dev/sdcf";
1015
1016 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
1017 return "/dev/sdcg";
1018
1019 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
1020 return "/dev/sdch";
1021
1022 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
1023 return "/dev/sdci";
1024
1025 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
1026 return "/dev/sdcj";
1027
1028 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
1029 return "/dev/sdck";
1030
1031 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
1032 return "/dev/sdcl";
1033
1034 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
1035 return "/dev/sdcm";
1036
1037 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
1038 return "/dev/sdcn";
1039
1040 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
1041 return "/dev/sdco";
1042
1043 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
1044 return "/dev/sdcp";
1045
1046 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
1047 return "/dev/sdcq";
1048
1049 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
1050 return "/dev/sdcr";
1051 break;
1052
1053
1054 case 70 : /* SCSI disk devices */
1055 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
1056 return "/dev/sdcs";
1057
1058 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
1059 return "/dev/sdct";
1060
1061 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
1062 return "/dev/sdcu";
1063
1064 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
1065 return "/dev/sdcv";
1066
1067 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
1068 return "/dev/sdcw";
1069
1070 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
1071 return "/dev/sdcx";
1072
1073 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
1074 return "/dev/sdcy";
1075
1076 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
1077 return "/dev/sdcz";
1078
1079 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
1080 return "/dev/sdda";
1081
1082 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
1083 return "/dev/sddb";
1084
1085 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
1086 return "/dev/sddc";
1087
1088 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
1089 return "/dev/sddd";
1090
1091 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
1092 return "/dev/sdde";
1093
1094 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
1095 return "/dev/sddf";
1096
1097 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
1098 return "/dev/sddg";
1099
1100 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
1101 return "/dev/sddh";
1102 break;
1103
1104 case 71: /* SCSI disk devices */
1105 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
1106 return "/dev/sddi";
1107
1108 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
1109 return "/dev/sddj";
1110
1111 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
1112 return "/dev/sddk";
1113
1114 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
1115 return "/dev/sddl";
1116
1117 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
1118 return "/dev/sddm";
1119
1120 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
1121 return "/dev/sddn";
1122
1123 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
1124 return "/dev/sddo";
1125
1126 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
1127 return "/dev/sddp";
1128
1129 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
1130 return "/dev/sddq";
1131
1132 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
1133 return "/dev/sddr";
1134
1135 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
1136 return "/dev/sdds";
1137
1138 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
1139 return "/dev/sddt";
1140
1141 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
1142 return "/dev/sddu";
1143
1144 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
1145 return "/dev/sddv";
1146
1147 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
1148 return "/dev/sddw";
1149
1150 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
1151 return "/dev/sddx";
1152 break;
1153
1154 case 128: /* SCSI disk devices */
1155 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
1156 return "/dev/sddy";
1157
1158 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
1159 return "/dev/sddz";
1160
1161 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
1162 return "/dev/sdea";
1163
1164 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
1165 return "/dev/sdeb";
1166
1167 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
1168 return "/dev/sdec";
1169
1170 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
1171 return "/dev/sded";
1172
1173 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
1174 return "/dev/sdee";
1175
1176 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
1177 return "/dev/sdef";
1178
1179 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
1180 return "/dev/sdeg";
1181
1182 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
1183 return "/dev/sdeh";
1184
1185 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
1186 return "/dev/sdei";
1187
1188 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
1189 return "/dev/sdej";
1190
1191 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
1192 return "/dev/sdek";
1193
1194 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
1195 return "/dev/sdel";
1196
1197 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
1198 return "/dev/sdem";
1199
1200 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
1201 return "/dev/sden";
1202 break;
1203
1204 case 129: /* SCSI disk devices */
1205 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 16))
1206 return "/dev/sdeo";
1207
1208 if((disk_data->minor_number >= 16) && (disk_data->minor_number < 32))
1209 return "/dev/sdep";
1210
1211 if((disk_data->minor_number >= 32) && (disk_data->minor_number < 48))
1212 return "/dev/sdeq";
1213
1214 if((disk_data->minor_number >= 48) && (disk_data->minor_number < 64))
1215 return "/dev/sder";
1216
1217 if((disk_data->minor_number >= 64) && (disk_data->minor_number < 80))
1218 return "/dev/sdes";
1219
1220 if((disk_data->minor_number >= 80) && (disk_data->minor_number < 96))
1221 return "/dev/sdet";
1222
1223 if((disk_data->minor_number >= 96) && (disk_data->minor_number < 112))
1224 return "/dev/sdeu";
1225
1226 if((disk_data->minor_number >= 112) && (disk_data->minor_number < 128))
1227 return "/dev/sdev";
1228
1229 if((disk_data->minor_number >= 128) && (disk_data->minor_number < 144))
1230 return "/dev/sdew";
1231
1232 if((disk_data->minor_number >= 144) && (disk_data->minor_number < 160))
1233 return "/dev/sdez";
1234
1235 if((disk_data->minor_number >= 160) && (disk_data->minor_number < 176))
1236 return "/dev/sdey";
1237
1238 if((disk_data->minor_number >= 176) && (disk_data->minor_number < 192))
1239 return "/dev/sdez";
1240
1241 if((disk_data->minor_number >= 192) && (disk_data->minor_number < 208))
1242 return "/dev/sdfa";
1243
1244 if((disk_data->minor_number >= 208) && (disk_data->minor_number < 224))
1245 return "/dev/sdfb";
1246
1247 if((disk_data->minor_number >= 224) && (disk_data->minor_number < 240))
1248 return "/dev/sdfc";
1249
1250 if((disk_data->minor_number >= 240) && (disk_data->minor_number < 256))
1251 return "/dev/sdfd";
1252 break;
1253 /*USB block devices*/
1254 case 180:
1255 if( (disk_data->minor_number >= 0) && (disk_data->minor_number < 8))
1256 return "/dev/uba";
1257 if( (disk_data->minor_number >= 8) && (disk_data->minor_number < 16))
1258 return "/dev/ubb";
1259 if( (disk_data->minor_number >= 16) && (disk_data->minor_number < 24))
1260 return "/dev/ubc";
1261 break;
1262
1263 }
1264
1265
1266 }
1267 LTTV_MODULE("diskperformance", "disk info view", \
1268 "Produce disk I/O performance", \
1269 init, destroy, "lttvwindow")
1270
This page took 0.051821 seconds and 3 git commands to generate.