equal
deleted
inserted
replaced
2766 len = jio_vfprintf(defaultStream::output_stream(), fmt, args); |
2766 len = jio_vfprintf(defaultStream::output_stream(), fmt, args); |
2767 va_end(args); |
2767 va_end(args); |
2768 return len; |
2768 return len; |
2769 } |
2769 } |
2770 |
2770 |
2771 |
|
2772 // HotSpot specific jio method |
2771 // HotSpot specific jio method |
2773 void jio_print(const char* s) { |
2772 void jio_print(const char* s, size_t len) { |
2774 // Try to make this function as atomic as possible. |
2773 // Try to make this function as atomic as possible. |
2775 if (Arguments::vfprintf_hook() != NULL) { |
2774 if (Arguments::vfprintf_hook() != NULL) { |
2776 jio_fprintf(defaultStream::output_stream(), "%s", s); |
2775 jio_fprintf(defaultStream::output_stream(), "%.*s", (int)len, s); |
2777 } else { |
2776 } else { |
2778 // Make an unused local variable to avoid warning from gcc 4.x compiler. |
2777 // Make an unused local variable to avoid warning from gcc 4.x compiler. |
2779 size_t count = ::write(defaultStream::output_fd(), s, (int)strlen(s)); |
2778 size_t count = ::write(defaultStream::output_fd(), s, (int)len); |
2780 } |
2779 } |
2781 } |
2780 } |
2782 |
2781 |
2783 } // Extern C |
2782 } // Extern C |
2784 |
2783 |