* pmaps/*.c: Change pmap type from MAP to PMAP.
* pmaps/pmap.test: Adjust results to match
the more compact histogram format.
* maps/map.test: Adjust results to match
the more compact histogram format.
+2005-12-07 Martin Hunt <hunt@redhat.com>
+ * pmaps/*.c: Change pmap type from MAP to PMAP.
+
+ * pmaps/pmap.test: Adjust results to match
+ the more compact histogram format.
+
+ * maps/map.test: Adjust results to match
+ the more compact histogram format.
+
2005-11-28 Martin Hunt <hunt@redhat.com>
* pmaps/pmap.test: Add ix_log and ix_none.
64 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 8192
128 | 0
256 | 0
- 512 | 0
map2[2] = count:1048576 sum:536346624 avg:511 min:0 max:1023
value |-------------------------------------------------- count
Bogons per packet for Ohio
count:20 sum:1000 avg:50 min:50 max:50
value |-------------------------------------------------- count
- 0 | 0
- 10 | 0
- 20 | 0
30 | 0
40 | 0
50 |@@@@@@@@@@@@@@@@@@@@ 20
60 | 0
70 | 0
- 80 | 0
- 90 | 0
Bogons per packet for North Carolina
count:45 sum:-4200 avg:-93 min:-620 max:100
50 |@@@ 9
60 | 0
70 | 0
- 80 | 0
- 90 | 0
SORTED BY COUNT
int main ()
{
- MAP map = _stp_pmap_new_ii(4);
+ PMAP map = _stp_pmap_new_ii(4);
int64_t x;
/* put some data in. _processor_number is a global hack that allows */
/* print the aggregated data */
_stp_pmap_print(map,"map[%1d] = %d");
-
-
-
_stp_pmap_del (map);
return 0;
}
int main ()
{
MAP map = _stp_map_new_ii(4);
- MAP pmap = _stp_pmap_new_ii(4);
+ PMAP pmap = _stp_pmap_new_ii(4);
int64_t x;
/* put some data in. _processor_number is a global hack that allows */
int main ()
{
- MAP map = _stp_pmap_new_ii(4);
+ PMAP map = _stp_pmap_new_ii(4);
int i;
/* put some data in. _processor_number is a global hack that allows */
int main ()
{
- MAP map = _stp_pmap_new_is(4);
+ PMAP map = _stp_pmap_new_is(4);
char *x;
char buf[32];
int main ()
{
- MAP map = _stp_pmap_new_ix(4, HIST_LINEAR, 0, 100, 10);
+ PMAP map = _stp_pmap_new_ix(4, HIST_LINEAR, 0, 100, 10);
int64_t x;
/* put some data in. _processor_number is a global hack that allows */
int main ()
{
- MAP map = _stp_pmap_new_ix(4, HIST_LINEAR, 0, 100, 10);
+ PMAP map = _stp_pmap_new_ix(4, HIST_LINEAR, 0, 100, 10);
int i;
/* put some data in. _processor_number is a global hack that allows */
int main ()
{
- MAP map = _stp_pmap_new_ix(4, HIST_LOG, 5);
+ PMAP map = _stp_pmap_new_ix(4, HIST_LOG, 5);
int64_t x;
/* put some data in. _processor_number is a global hack that allows */
int main ()
{
- MAP map = _stp_pmap_new_ix(4, HIST_NONE);
+ PMAP map = _stp_pmap_new_ix(4, HIST_NONE);
int64_t x;
/* put some data in. _processor_number is a global hack that allows */
int main ()
{
- MAP mapiis = _stp_pmap_new_iiss(4);
+ PMAP mapiis = _stp_pmap_new_iiss(4);
_processor_number = 0;
_stp_pmap_set_iiss (mapiis, 1,2,"Ohio", "Columbus" );
_stp_pmap_set_iiss (mapiis, 3,4,"California", "Sacramento" );
/* very bad string. don't crash */
_stp_pmap_print (mapiis, "%s -> mapiis %1s %2s %3d %4d");
- MAP mapss = _stp_pmap_new_ssi(4);
+ PMAP mapss = _stp_pmap_new_ssi(4);
_stp_pmap_set_ssi (mapss, "Riga", "Latvia", 0x0000c0dedbad0000LL);
_stp_pmap_set_ssi (mapss, "Sofia", "Bulgaria", 0xdeadf00d12345678LL);
_stp_pmap_set_ssi (mapss, "Valletta", "Malta", 1);
_stp_pmap_print (mapss, "The capitol of %1s is %2s and the nerd population is %x");
_stp_pmap_print (mapss, "The capitol of %1s is %2s and the nerd population is %X");
- MAP mapssx = _stp_pmap_new_ssx (4, HIST_LINEAR, 0, 100, 10 );
+ PMAP mapssx = _stp_pmap_new_ssx (4, HIST_LINEAR, 0, 100, 10 );
int i,j;
for (i = 0; i < 100; i++)
0 |@@@@@@@@ 8
10 | 0
20 | 0
- 30 | 0
- 40 | 0
- 50 | 0
- 60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[1] = count:8 sum:28 avg:3 min:0 max:7
value |-------------------------------------------------- count
0 |@@@@@@@@ 8
10 | 0
20 | 0
- 30 | 0
- 40 | 0
- 50 | 0
- 60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[3] = count:8 sum:140 avg:17 min:0 max:49
value |-------------------------------------------------- count
40 |@ 1
50 | 0
60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
}
1 |@@@@@@@@ 8
2 | 0
4 | 0
- 8 | 0
map[1] = count:8 sum:28 avg:3 min:0 max:7
value |-------------------------------------------------- count
0 |@@@@@@@@ 8
10 | 0
20 | 0
- 30 | 0
- 40 | 0
- 50 | 0
- 60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[1] = count:8 sum:28 avg:3 min:0 max:7
value |-------------------------------------------------- count
0 |@@@@@@@@ 8
10 | 0
20 | 0
- 30 | 0
- 40 | 0
- 50 | 0
- 60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[3] = count:8 sum:140 avg:17 min:0 max:49
value |-------------------------------------------------- count
40 |@ 1
50 | 0
60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[1] Sum = 28
0 |@@@@@@@@ 8
10 | 0
20 | 0
- 30 | 0
- 40 | 0
- 50 | 0
- 60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[1] = count:8 sum:28 avg:3 min:0 max:7
value |-------------------------------------------------- count
0 |@@@@@@@@ 8
10 | 0
20 | 0
- 30 | 0
- 40 | 0
- 50 | 0
- 60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[3] = count:8 sum:140 avg:17 min:0 max:49
value |-------------------------------------------------- count
40 |@ 1
50 | 0
60 | 0
- 70 | 0
- 80 | 0
- 90 | 0
map[1] Sum = 28
int main ()
{
- MAP map = _stp_pmap_new_si(4);
+ PMAP map = _stp_pmap_new_si(4);
int64_t x;
+ if (!map)
+ return -1;
+
/* put some data in. _processor_number is a global hack that allows */
/* us to set the current emulated cpu number for our userspace tests. */
/* Note that we set values based on the cpu number just to show that */