components/gnome/libgtop/patches/libgtop-04-sysinfo.patch
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Sat, 15 Oct 2016 13:59:18 -0700
changeset 7136 ff8962427c9b
permissions -rw-r--r--
24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7136
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     1
Solaris implementation of CPU information retrieval backend to fix bug 24898656
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     3
Need to submit upstream along with previous patches, once they're cleaned up.
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     5
--- libgtop-2.30.0/sysdeps/solaris/sysinfo.c
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
+++ libgtop-2.30.0/sysdeps/solaris/sysinfo.c
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
@@ -37,7 +37,96 @@
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
 static void
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
 init_sysinfo (glibtop *server)
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
 {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
+	kstat_ctl_t	*kc;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
+	guint		 ncpus;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
 
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
+	if (G_LIKELY (sysinfo.flags))
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
+		return;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
+	glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    18
+	ncpus = sysconf(_SC_NPROCESSORS_CONF);
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
+	if (server->machine.kc == NULL)
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    21
+		server->machine.kc = kstat_open ();
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
+	kc = server->machine.kc;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
+	for (sysinfo.ncpu = 0;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
+	     sysinfo.ncpu < GLIBTOP_NCPU && sysinfo.ncpu < ncpus;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
+	     sysinfo.ncpu++) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    27
+		glibtop_entry * const cpuinfo = &sysinfo.cpuinfo[sysinfo.ncpu];
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
+		kstat_t	*ksp;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
+		kstat_named_t *k;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
+		int status;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
+		ksp = kstat_lookup(kc, "cpu_info", sysinfo.ncpu, NULL);
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
+		if (ksp == NULL) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
+			continue;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
+		status = kstat_read(kc, ksp, NULL);
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
+		if (status == -1) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
+			continue;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    40
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    41
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    42
+		cpuinfo->labels = g_ptr_array_new ();
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    44
+		cpuinfo->values = g_hash_table_new_full(g_str_hash,
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
+							g_str_equal,
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
+							NULL, g_free);
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    47
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
+		g_ptr_array_add (cpuinfo->labels, "processor");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    49
+		g_hash_table_insert (cpuinfo->values, "processor",
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    50
+				     g_strdup_printf("%u", (guint)sysinfo.ncpu));
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    51
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    52
+		/* Map names from Solaris kstats to Linux /proc/cpuinfo keys */
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    53
+		k = (kstat_named_t *) kstat_data_lookup(ksp, "brand");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
+		if (k) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    55
+			g_ptr_array_add (cpuinfo->labels, "model name");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    56
+			g_hash_table_insert (cpuinfo->values, "model name",
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    57
+					     g_strdup(k->value.str.addr.ptr));
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    58
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    59
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    60
+		k = (kstat_named_t *) kstat_data_lookup(ksp, "core_id");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    61
+		if (k) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    62
+			g_ptr_array_add (cpuinfo->labels, "core id");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    63
+			g_hash_table_insert (cpuinfo->values, "core id",
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    64
+					     g_strdup_printf("%ld", k->value.l));
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    65
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    66
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    67
+		k = (kstat_named_t *) kstat_data_lookup(ksp, "clock_MHz");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    68
+		if (k) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    69
+			g_ptr_array_add (cpuinfo->labels, "cpu MHz");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    70
+			g_hash_table_insert (cpuinfo->values, "cpu MHz",
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    71
+					     g_strdup_printf("%ld", k->value.l));
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    72
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    73
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    74
+		k = (kstat_named_t *) kstat_data_lookup(ksp, "family");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    75
+		if (k) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    76
+			g_ptr_array_add (cpuinfo->labels, "cpu family");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    77
+			g_hash_table_insert (cpuinfo->values, "cpu family",
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    78
+					     g_strdup_printf("%ld", k->value.l));
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    79
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    80
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    81
+		k = (kstat_named_t *) kstat_data_lookup(ksp, "model");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    82
+		if (k) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    83
+			g_ptr_array_add (cpuinfo->labels, "model");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    84
+			g_hash_table_insert (cpuinfo->values, "model",
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    85
+					     g_strdup_printf("%ld", k->value.l));
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    86
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    87
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    88
+		k = (kstat_named_t *) kstat_data_lookup(ksp, "vendor_id");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    89
+		if (k) {
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    90
+			g_ptr_array_add (cpuinfo->labels, "vendor_id");
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    91
+			g_hash_table_insert (cpuinfo->values, "vendor_id",
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    92
+					     g_strdup(k->value.str.addr.ptr));
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    93
+		}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    94
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    95
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    96
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    97
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    98
+	}
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    99
+
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   100
+	sysinfo.flags = _glibtop_sysdeps_sysinfo;
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   101
 }
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   102
 
ff8962427c9b 24898656 libgtop needs to fill in GLIBTOP_SYSINFO_CPUINFO on Solaris
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
   103
 const glibtop_sysinfo *