diff --git a/src/share/vm/utilities/events.cpp b/src/share/vm/utilities/events.cpp index 8ccd65095e4e687014a4b7ad431b2e1914fbd2b5..093eae293f24688c1a07500c35382d52bed52f59 100644 --- a/src/share/vm/utilities/events.cpp +++ b/src/share/vm/utilities/events.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -82,7 +82,7 @@ EventMark::EventMark(const char* format, ...) { va_start(ap, format); // Save a copy of begin message and log it. _buffer.printv(format, ap); - Events::log(NULL, _buffer); + Events::log(NULL, "%s", (const char*)_buffer); va_end(ap); } } @@ -91,6 +91,6 @@ EventMark::~EventMark() { if (LogEvents) { // Append " done" to the begin message and log it _buffer.append(" done"); - Events::log(NULL, _buffer); + Events::log(NULL, "%s", (const char*)_buffer); } }