- Timestamp:
- Jan 15, 2009 10:19:58 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r15933 r15956 3 3 # include <paths.h> 4 4 #endif 5 6 /* disable these counters for the final release */7 /* #define VBOX_WITHOUT_RELEASE_STATISTICS */8 5 9 6 #include <VBox/err.h> … … 521 518 int i; 522 519 523 STAM_ REL_PROFILE_START(&pData->StatFill, a);520 STAM_PROFILE_START(&pData->StatFill, a); 524 521 525 522 nfds = *pnfds; … … 552 549 ICMP_ENGAGE_EVENT(&pData->icmp_socket, readfds); 553 550 554 STAM_ REL_COUNTER_RESET(&pData->StatTCP);555 STAM_ REL_COUNTER_RESET(&pData->StatTCPHot);551 STAM_COUNTER_RESET(&pData->StatTCP); 552 STAM_COUNTER_RESET(&pData->StatTCPHot); 556 553 557 554 for (so = tcb.so_next; so != &tcb; so = so_next) … … 559 556 so_next = so->so_next; 560 557 561 STAM_ REL_COUNTER_INC(&pData->StatTCP);558 STAM_COUNTER_INC(&pData->StatTCP); 562 559 563 560 /* … … 579 576 if (so->so_state & SS_FACCEPTCONN) 580 577 { 581 STAM_ REL_COUNTER_INC(&pData->StatTCPHot);578 STAM_COUNTER_INC(&pData->StatTCPHot); 582 579 TCP_ENGAGE_EVENT1(so, readfds); 583 580 continue; … … 590 587 { 591 588 Log2(("connecting %R[natsock] engaged\n",so)); 592 STAM_ REL_COUNTER_INC(&pData->StatTCPHot);589 STAM_COUNTER_INC(&pData->StatTCPHot); 593 590 TCP_ENGAGE_EVENT1(so, writefds); 594 591 } … … 600 597 if (CONN_CANFSEND(so) && so->so_rcv.sb_cc) 601 598 { 602 STAM_ REL_COUNTER_INC(&pData->StatTCPHot);599 STAM_COUNTER_INC(&pData->StatTCPHot); 603 600 TCP_ENGAGE_EVENT1(so, writefds); 604 601 } … … 610 607 if (CONN_CANFRCV(so) && (so->so_snd.sb_cc < (so->so_snd.sb_datalen/2))) 611 608 { 612 STAM_ REL_COUNTER_INC(&pData->StatTCPHot);609 STAM_COUNTER_INC(&pData->StatTCPHot); 613 610 TCP_ENGAGE_EVENT2(so, readfds, xfds); 614 611 } … … 618 615 * UDP sockets 619 616 */ 620 STAM_ REL_COUNTER_RESET(&pData->StatUDP);621 STAM_ REL_COUNTER_RESET(&pData->StatUDPHot);617 STAM_COUNTER_RESET(&pData->StatUDP); 618 STAM_COUNTER_RESET(&pData->StatUDPHot); 622 619 623 620 for (so = udb.so_next; so != &udb; so = so_next) … … 625 622 so_next = so->so_next; 626 623 627 STAM_ REL_COUNTER_INC(&pData->StatUDP);624 STAM_COUNTER_INC(&pData->StatUDP); 628 625 629 626 /* … … 653 650 if ((so->so_state & SS_ISFCONNECTED) && so->so_queued <= 4) 654 651 { 655 STAM_ REL_COUNTER_INC(&pData->StatUDPHot);652 STAM_COUNTER_INC(&pData->StatUDPHot); 656 653 UDP_ENGAGE_EVENT(so, readfds); 657 654 } … … 666 663 #endif 667 664 668 STAM_ REL_PROFILE_STOP(&pData->StatFill, a);665 STAM_PROFILE_STOP(&pData->StatFill, a); 669 666 } 670 667 … … 683 680 #endif 684 681 685 STAM_ REL_PROFILE_START(&pData->StatPoll, a);682 STAM_PROFILE_START(&pData->StatPoll, a); 686 683 687 684 /* Update time */ … … 695 692 if (time_fasttimo && ((curtime - time_fasttimo) >= 2)) 696 693 { 697 STAM_ REL_PROFILE_START(&pData->StatFastTimer, a);694 STAM_PROFILE_START(&pData->StatFastTimer, a); 698 695 tcp_fasttimo(pData); 699 696 time_fasttimo = 0; 700 STAM_ REL_PROFILE_STOP(&pData->StatFastTimer, a);697 STAM_PROFILE_STOP(&pData->StatFastTimer, a); 701 698 } 702 699 if (do_slowtimo && ((curtime - last_slowtimo) >= 499)) 703 700 { 704 STAM_ REL_PROFILE_START(&pData->StatSlowTimer, a);701 STAM_PROFILE_START(&pData->StatSlowTimer, a); 705 702 ip_slowtimo(pData); 706 703 tcp_slowtimo(pData); 707 704 last_slowtimo = curtime; 708 STAM_ REL_PROFILE_STOP(&pData->StatSlowTimer, a);705 STAM_PROFILE_STOP(&pData->StatSlowTimer, a); 709 706 } 710 707 } … … 932 929 if_start(pData); 933 930 934 STAM_ REL_PROFILE_STOP(&pData->StatPoll, a);931 STAM_PROFILE_STOP(&pData->StatPoll, a); 935 932 } 936 933 … … 1067 1064 1068 1065 m = m_get(pData); 1069 if (m == NULL) 1066 if (!m) 1067 { 1070 1068 LogRel(("can't allocate new mbuf\n")); 1069 return; 1070 } 1071 1071 1072 1072 /* Note: we add to align the IP header */
Note:
See TracChangeset
for help on using the changeset viewer.