equal
deleted
inserted
replaced
139 } |
139 } |
140 |
140 |
141 static const size_t TagSetBufferSize = 128; |
141 static const size_t TagSetBufferSize = 128; |
142 |
142 |
143 void LogTagSet::describe_tagsets(outputStream* out) { |
143 void LogTagSet::describe_tagsets(outputStream* out) { |
144 out->print_cr("Described tag combinations:"); |
144 out->print_cr("Described tag sets:"); |
145 for (const LogTagSetDescription* d = tagset_descriptions; d->tagset != NULL; d++) { |
145 for (const LogTagSetDescription* d = tagset_descriptions; d->tagset != NULL; d++) { |
146 char buf[TagSetBufferSize]; |
146 char buf[TagSetBufferSize]; |
147 d->tagset->label(buf, sizeof(buf), "+"); |
147 d->tagset->label(buf, sizeof(buf), "+"); |
148 out->print_cr(" %s: %s", buf, d->descr); |
148 out->print_cr(" %s: %s", buf, d->descr); |
149 } |
149 } |
167 |
167 |
168 // Sort them lexicographically |
168 // Sort them lexicographically |
169 qsort(tagset_labels, _ntagsets, sizeof(*tagset_labels), qsort_strcmp); |
169 qsort(tagset_labels, _ntagsets, sizeof(*tagset_labels), qsort_strcmp); |
170 |
170 |
171 // Print and then free the labels |
171 // Print and then free the labels |
172 out->print("All available tag sets: "); |
172 out->print("Available tag sets: "); |
173 for (idx = 0; idx < _ntagsets; idx++) { |
173 for (idx = 0; idx < _ntagsets; idx++) { |
174 out->print("%s%s", (idx == 0 ? "" : ", "), tagset_labels[idx]); |
174 out->print("%s%s", (idx == 0 ? "" : ", "), tagset_labels[idx]); |
175 os::free(tagset_labels[idx]); |
175 os::free(tagset_labels[idx]); |
176 } |
176 } |
177 out->cr(); |
177 out->cr(); |