RFR: 8146948: Add help information to log tags

Marcus Larsson marcus.larsson at oracle.com
Tue May 10 06:57:08 UTC 2016

Updated webrev:



On 05/09/2016 08:37 PM, Kim Barrett wrote:
>> On May 9, 2016, at 3:36 AM, Marcus Larsson <marcus.larsson at oracle.com> wrote:
>> On 05/04/2016 08:30 PM, Kim Barrett wrote:
>>> src/share/vm/logging/logTagSetDescriptions.inline.hpp
>>>    39 static struct LogTagSetDescription {
>>>    40   const LogTagSet* tagset;
>>>    41   const char* descr;
>>>    42 } tagset_descriptions[] = {
>>>    44   { NULL, NULL }
>>>    45 };
>>> Won't this place a copy of the descriptions in each translation unit
>>> that includes this file, each in it's own file-scoped
>>> tagset_descriptions variable?  I think better would be a class
>>> definition with a static const array member in the header, with the
>>> member definition (including the associated macrology) in a .cpp file.
>> The intention is that this file should only be included from logTagSet.cpp and therefore not cause any copying of the descriptions. The first approach was just to have them in logTagSet.cpp but I wanted an easy to find place for where to add/edit descriptions so I opted for a separate file. I didn't want to make a whole hpp/cpp pair for it, but if you still think that would be better I can do it; let me know.
> logTagSetDescriptions.inline.hpp is included by both logTagSet.cpp and log.cpp.
> Even if that weren’t already a problem, it would be an accident waiting to happen
> in future development/maintenance.

More information about the hotspot-dev mailing list