• Home
  • Raw
  • Download

Lines Matching refs:ge

124 void clear_ge_ui_info(struct gui_entry *ge)  in clear_ge_ui_info()  argument
126 gtk_label_set_text(GTK_LABEL(ge->probe.hostname), ""); in clear_ge_ui_info()
127 gtk_label_set_text(GTK_LABEL(ge->probe.os), ""); in clear_ge_ui_info()
128 gtk_label_set_text(GTK_LABEL(ge->probe.arch), ""); in clear_ge_ui_info()
129 gtk_label_set_text(GTK_LABEL(ge->probe.fio_ver), ""); in clear_ge_ui_info()
132 gtk_entry_set_text(GTK_ENTRY(ge->eta.name), ""); in clear_ge_ui_info()
134 multitext_update_entry(&ge->eta.iotype, 0, ""); in clear_ge_ui_info()
135 multitext_update_entry(&ge->eta.bs, 0, ""); in clear_ge_ui_info()
136 multitext_update_entry(&ge->eta.ioengine, 0, ""); in clear_ge_ui_info()
137 multitext_update_entry(&ge->eta.iodepth, 0, ""); in clear_ge_ui_info()
138 gtk_entry_set_text(GTK_ENTRY(ge->eta.jobs), ""); in clear_ge_ui_info()
139 gtk_entry_set_text(GTK_ENTRY(ge->eta.files), ""); in clear_ge_ui_info()
140 gtk_entry_set_text(GTK_ENTRY(ge->eta.read_bw), ""); in clear_ge_ui_info()
141 gtk_entry_set_text(GTK_ENTRY(ge->eta.read_iops), ""); in clear_ge_ui_info()
142 gtk_entry_set_text(GTK_ENTRY(ge->eta.write_bw), ""); in clear_ge_ui_info()
143 gtk_entry_set_text(GTK_ENTRY(ge->eta.write_iops), ""); in clear_ge_ui_info()
204 static void add_buttons(struct gui_entry *ge, struct button_spec *buttonlist, in add_buttons() argument
210 ge->button[i] = add_button(ge->buttonbox, &buttonlist[i], ge); in add_buttons()
217 static void update_button_states(struct gui *ui, struct gui_entry *ge) in update_button_states() argument
222 switch (ge->state) { in update_button_states()
224 gfio_report_error(ge, "Bad client state: %u\n", ge->state); in update_button_states()
270 gtk_widget_set_sensitive(ge->button[GFIO_BUTTON_CONNECT], connect_state); in update_button_states()
271 gtk_widget_set_sensitive(ge->button[GFIO_BUTTON_SEND], send_state); in update_button_states()
272 gtk_widget_set_sensitive(ge->button[GFIO_BUTTON_START], start_state); in update_button_states()
273 gtk_button_set_label(GTK_BUTTON(ge->button[GFIO_BUTTON_CONNECT]), connect_str); in update_button_states()
274 …gtk_widget_set_tooltip_text(ge->button[GFIO_BUTTON_CONNECT], get_button_tooltip(&buttonspeclist[GF… in update_button_states()
283 if (ge->client && ge->client->nr_results) in update_button_states()
289 void gfio_set_state(struct gui_entry *ge, unsigned int state) in gfio_set_state() argument
291 ge->state = state; in gfio_set_state()
292 update_button_states(ge->ui, ge); in gfio_set_state()
384 static void ge_destroy(struct gui_entry *ge) in ge_destroy() argument
386 struct gfio_client *gc = ge->client; in ge_destroy()
390 if (ge->state >= GE_STATE_CONNECTED) in ge_destroy()
398 g_hash_table_remove(ge->ui->ge_hash, &ge->page_num); in ge_destroy()
400 free(ge->job_file); in ge_destroy()
401 free(ge->host); in ge_destroy()
402 free(ge); in ge_destroy()
407 struct gui_entry *ge = (struct gui_entry *) data; in ge_widget_destroy() local
409 ge_destroy(ge); in ge_widget_destroy()
435 static int send_job_file(struct gui_entry *ge) in send_job_file() argument
437 struct gfio_client *gc = ge->client; in send_job_file()
452 ret = fio_client_send_ini(gc->client, ge->job_file, 0); in send_job_file()
456 gfio_report_error(ge, "Failed to send file %s: %s\n", ge->job_file, strerror(-ret)); in send_job_file()
481 struct gui_entry *ge = data; in start_job_clicked() local
482 struct gfio_client *gc = ge->client; in start_job_clicked()
531 static int get_connection_details(struct gui_entry *ge) in get_connection_details() argument
535 struct gui *ui = ge->ui; in get_connection_details()
538 if (ge->host) in get_connection_details()
611 ge->host = strdup(gtk_entry_get_text(GTK_ENTRY(cw.hentry))); in get_connection_details()
612 ge->port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pentry)); in get_connection_details()
616 ge->type = Fio_client_ipv4; in get_connection_details()
618 ge->type = Fio_client_ipv6; in get_connection_details()
620 ge->type = Fio_client_socket; in get_connection_details()
623 ge->server_start = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cw.button)); in get_connection_details()
635 static void gfio_client_added(struct gui_entry *ge, struct fio_client *client) in gfio_client_added() argument
642 gc->ge = ge; in gfio_client_added()
643 ge->client = gc; in gfio_client_added()
665 struct gui_entry *ge = data; in connect_clicked() local
666 struct gfio_client *gc = ge->client; in connect_clicked()
668 if (ge->state == GE_STATE_NEW) { in connect_clicked()
671 if (!ge->job_file) in connect_clicked()
672 file_open(widget, ge->ui); in connect_clicked()
673 if (!ge->job_file) in connect_clicked()
676 gc = ge->client; in connect_clicked()
681 if (get_connection_details(ge)) { in connect_clicked()
682 gfio_report_error(ge, "Failed to get connection details\n"); in connect_clicked()
686 client = fio_client_add_explicit(&gfio_client_ops, ge->host, ge->type, ge->port); in connect_clicked()
688 gfio_report_error(ge, "Failed to add client %s\n", ge->host); in connect_clicked()
689 free(ge->host); in connect_clicked()
690 ge->host = NULL; in connect_clicked()
696 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ge->thread_status_pb), "No jobs running"); in connect_clicked()
697 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ge->thread_status_pb), 0.0); in connect_clicked()
700 if (!ge->ui->handler_running) in connect_clicked()
701 pthread_create(&ge->ui->t, NULL, job_thread, ge->ui); in connect_clicked()
702 gfio_set_state(ge, GE_STATE_CONNECTED); in connect_clicked()
703 gfio_clear_graph_data(&ge->graphs); in connect_clicked()
705 …gfio_report_error(ge, "Failed to connect to %s: %s\n", ge->client->client->hostname, strerror(-ret… in connect_clicked()
709 gfio_set_state(ge, GE_STATE_NEW); in connect_clicked()
710 clear_ge_ui_info(ge); in connect_clicked()
716 struct gui_entry *ge = data; in send_clicked() local
718 if (send_job_file(ge)) in send_clicked()
719 gtk_widget_set_sensitive(ge->button[GFIO_BUTTON_START], 1); in send_clicked()
722 static GtkWidget *new_client_page(struct gui_entry *ge);
726 struct gui_entry *ge; in alloc_new_gui_entry() local
728 ge = malloc(sizeof(*ge)); in alloc_new_gui_entry()
729 memset(ge, 0, sizeof(*ge)); in alloc_new_gui_entry()
730 ge->state = GE_STATE_NEW; in alloc_new_gui_entry()
731 ge->ui = ui; in alloc_new_gui_entry()
732 return ge; in alloc_new_gui_entry()
737 struct gui_entry *ge; in get_new_ge_with_tab() local
739 ge = alloc_new_gui_entry(ui); in get_new_ge_with_tab()
741 ge->vbox = new_client_page(ge); in get_new_ge_with_tab()
742 g_signal_connect(ge->vbox, "destroy", G_CALLBACK(ge_widget_destroy), ge); in get_new_ge_with_tab()
744 ge->page_label = gtk_label_new(name); in get_new_ge_with_tab()
745 ge->page_num = gtk_notebook_append_page(GTK_NOTEBOOK(ui->notebook), ge->vbox, ge->page_label); in get_new_ge_with_tab()
747 g_hash_table_insert(ui->ge_hash, &ge->page_num, ge); in get_new_ge_with_tab()
750 return ge; in get_new_ge_with_tab()
756 struct gui_entry *ge; in file_new() local
758 ge = get_new_ge_with_tab(ui, "Untitled"); in file_new()
759 gtk_notebook_set_current_page(GTK_NOTEBOOK(ui->notebook), ge->page_num); in file_new()
799 struct gui_entry *ge; in file_close() local
804 ge = get_ge_from_cur_tab(ui); in file_close()
805 if (ge) { in file_close()
806 gtk_widget_destroy(ge->vbox); in file_close()
840 static int do_file_open(struct gui_entry *ge, const gchar *uri) in do_file_open() argument
844 assert(!ge->job_file); in do_file_open()
846 ge->job_file = get_filename_from_uri(uri); in do_file_open()
848 client = fio_client_add_explicit(&gfio_client_ops, ge->host, ge->type, ge->port); in do_file_open()
853 gtk_label_set_text(GTK_LABEL(ge->page_label), basename(label)); in do_file_open()
856 gfio_client_added(ge, client); in do_file_open()
857 file_add_recent(ge->ui, uri); in do_file_open()
861 gfio_report_error(ge, "Failed to add client %s\n", ge->host); in do_file_open()
862 free(ge->host); in do_file_open()
863 ge->host = NULL; in do_file_open()
864 free(ge->job_file); in do_file_open()
865 ge->job_file = NULL; in do_file_open()
871 struct gui_entry *ge; in do_file_open_with_tab() local
880 ge = get_ge_from_page(ui, cur_page, &ge_is_new); in do_file_open_with_tab()
881 if (ge->client) { in do_file_open_with_tab()
882 ge = get_new_ge_with_tab(ui, "Untitled"); in do_file_open_with_tab()
886 gtk_notebook_set_current_page(GTK_NOTEBOOK(ui->notebook), ge->page_num); in do_file_open_with_tab()
888 if (get_connection_details(ge)) { in do_file_open_with_tab()
890 gtk_widget_destroy(ge->vbox); in do_file_open_with_tab()
895 ret = do_file_open(ge, uri); in do_file_open_with_tab()
898 if (ge->server_start) in do_file_open_with_tab()
902 gtk_widget_destroy(ge->vbox); in do_file_open_with_tab()
1030 struct gui_entry *ge; in connect_job_entry() local
1032 ge = get_ge_from_cur_tab(ui); in connect_job_entry()
1033 if (ge) in connect_job_entry()
1034 connect_clicked(w, ge); in connect_job_entry()
1040 struct gui_entry *ge; in send_job_entry() local
1042 ge = get_ge_from_cur_tab(ui); in send_job_entry()
1043 if (ge) in send_job_entry()
1044 send_clicked(w, ge); in send_job_entry()
1050 struct gui_entry *ge; in edit_job_entry() local
1052 ge = get_ge_from_cur_tab(ui); in edit_job_entry()
1053 if (ge && ge->client) in edit_job_entry()
1054 gopt_get_options_window(ui->window, ge->client); in edit_job_entry()
1060 struct gui_entry *ge; in start_job_entry() local
1062 ge = get_ge_from_cur_tab(ui); in start_job_entry()
1063 if (ge) in start_job_entry()
1064 start_job_clicked(w, ge); in start_job_entry()
1071 struct gui_entry *ge; in view_results() local
1073 ge = get_ge_from_cur_tab(ui); in view_results()
1074 if (!ge) in view_results()
1077 if (ge->results_window) in view_results()
1080 gc = ge->client; in view_results()
1095 struct gui_entry *ge = (struct gui_entry *) value; in ge_update_settings_fn() local
1098 __update_graph_settings(&ge->graphs); in ge_update_settings_fn()
1101 …g_signal_emit_by_name(G_OBJECT(ge->graphs.drawing_area), GFIO_DRAW_EVENT, GTK_WIDGET(ge->graphs.dr… in ge_update_settings_fn()
1335 struct gui_entry *ge = (struct gui_entry *) data; in combo_entry_changed() local
1340 multitext_set_entry(&ge->eta.iotype, index); in combo_entry_changed()
1341 multitext_set_entry(&ge->eta.bs, index); in combo_entry_changed()
1342 multitext_set_entry(&ge->eta.ioengine, index); in combo_entry_changed()
1343 multitext_set_entry(&ge->eta.iodepth, index); in combo_entry_changed()
1348 struct gui_entry *ge = (struct gui_entry *) data; in combo_entry_destroy() local
1350 multitext_free(&ge->eta.iotype); in combo_entry_destroy()
1351 multitext_free(&ge->eta.bs); in combo_entry_destroy()
1352 multitext_free(&ge->eta.ioengine); in combo_entry_destroy()
1353 multitext_free(&ge->eta.iodepth); in combo_entry_destroy()
1356 static GtkWidget *new_client_page(struct gui_entry *ge) in new_client_page() argument
1375 ge->probe.hostname = new_info_label_in_frame(probe_box, "Host"); in new_client_page()
1376 ge->probe.os = new_info_label_in_frame(probe_box, "OS"); in new_client_page()
1377 ge->probe.arch = new_info_label_in_frame(probe_box, "Architecture"); in new_client_page()
1378 ge->probe.fio_ver = new_info_label_in_frame(probe_box, "Fio version"); in new_client_page()
1383 ge->eta.names = new_combo_entry_in_frame(probe_box, "Jobs"); in new_client_page()
1384 g_signal_connect(ge->eta.names, "changed", G_CALLBACK(combo_entry_changed), ge); in new_client_page()
1385 g_signal_connect(ge->eta.names, "destroy", G_CALLBACK(combo_entry_destroy), ge); in new_client_page()
1386 ge->eta.iotype.entry = new_info_entry_in_frame(probe_box, "IO"); in new_client_page()
1387 ge->eta.bs.entry = new_info_entry_in_frame(probe_box, "Blocksize (Read/Write)"); in new_client_page()
1388 ge->eta.ioengine.entry = new_info_entry_in_frame(probe_box, "IO Engine"); in new_client_page()
1389 ge->eta.iodepth.entry = new_info_entry_in_frame(probe_box, "IO Depth"); in new_client_page()
1390 ge->eta.jobs = new_info_entry_in_frame(probe_box, "Jobs"); in new_client_page()
1391 ge->eta.files = new_info_entry_in_frame(probe_box, "Open files"); in new_client_page()
1395ge->eta.read_bw = new_info_entry_in_frame_rgb(probe_box, "Read BW", GFIO_READ_R, GFIO_READ_G, GFIO… in new_client_page()
1396ge->eta.read_iops = new_info_entry_in_frame_rgb(probe_box, "IOPS", GFIO_READ_R, GFIO_READ_G, GFIO_… in new_client_page()
1397ge->eta.write_bw = new_info_entry_in_frame_rgb(probe_box, "Write BW", GFIO_WRITE_R, GFIO_WRITE_G, … in new_client_page()
1398ge->eta.write_iops = new_info_entry_in_frame_rgb(probe_box, "IOPS", GFIO_WRITE_R, GFIO_WRITE_G, GF… in new_client_page()
1399ge->eta.trim_bw = new_info_entry_in_frame_rgb(probe_box, "Trim BW", GFIO_TRIM_R, GFIO_TRIM_G, GFIO… in new_client_page()
1400ge->eta.trim_iops = new_info_entry_in_frame_rgb(probe_box, "IOPS", GFIO_TRIM_R, GFIO_TRIM_G, GFIO_… in new_client_page()
1409 ge->eta.cr_bw = new_info_label_in_frame(probe_box, "Commit BW"); in new_client_page()
1410 ge->eta.cr_iops = new_info_label_in_frame(probe_box, "Commit IOPS"); in new_client_page()
1412 ge->eta.cw_bw = new_info_label_in_frame(probe_box, "Commit BW"); in new_client_page()
1413 ge->eta.cw_iops = new_info_label_in_frame(probe_box, "Commit IOPS"); in new_client_page()
1419 ge->graphs.drawing_area = gtk_drawing_area_new(); in new_client_page()
1420 gtk_widget_set_size_request(GTK_WIDGET(ge->graphs.drawing_area), in new_client_page()
1422 gtk_widget_modify_bg(ge->graphs.drawing_area, GTK_STATE_NORMAL, &gfio_color_lightyellow); in new_client_page()
1423 g_signal_connect(G_OBJECT(ge->graphs.drawing_area), GFIO_DRAW_EVENT, in new_client_page()
1424 G_CALLBACK(on_expose_drawing_area), &ge->graphs); in new_client_page()
1425 g_signal_connect(G_OBJECT(ge->graphs.drawing_area), "configure_event", in new_client_page()
1426 G_CALLBACK(on_config_drawing_area), &ge->graphs); in new_client_page()
1431 ge->graphs.drawing_area); in new_client_page()
1434 setup_graphs(&ge->graphs); in new_client_page()
1441 ge->buttonbox = gtk_hbox_new(FALSE, 0); in new_client_page()
1442 gtk_container_add(GTK_CONTAINER(bottom_align), ge->buttonbox); in new_client_page()
1445 add_buttons(ge, buttonspeclist, ARRAY_SIZE(buttonspeclist)); in new_client_page()
1450 ge->thread_status_pb = gtk_progress_bar_new(); in new_client_page()
1451 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ge->thread_status_pb), 0.0); in new_client_page()
1452 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ge->thread_status_pb), "No connections"); in new_client_page()
1453 gtk_container_add(GTK_CONTAINER(ge->buttonbox), ge->thread_status_pb); in new_client_page()
1550 struct gui_entry *ge; in notebook_switch_page() local
1559 ge = get_ge_from_page(ui, page, NULL); in notebook_switch_page()
1560 if (ge) in notebook_switch_page()
1561 update_button_states(ui, ge); in notebook_switch_page()