Lines Matching refs:output
38 void OutputJsonKey(FILE *output, const T &value)
45 fprintf(output, "\"%s\":", value.c_str());
51 fprintf(output, "\"%s\":", value.data());
57 fprintf(output, "\"%s\":", value);
59 fprintf(output, "\"%s\":", std::to_string(value).c_str());
63 void OutputJsonValue(FILE *output, const T &value, bool first = true)
66 fprintf(output, ",");
69 fprintf(output, "\"%s\"", value.c_str());
71 fprintf(output, "\"%s\"", value.data());
73 fprintf(output, "%s", std::to_string(value).c_str());
75 fprintf(output, "%s", std::to_string(value).c_str());
77 fprintf(output, "%s", std::to_string(value).c_str());
79 fprintf(output, "%s", std::to_string(value).c_str());
81 fprintf(output, "\"%s\"", value);
83 value.OutputJson(output);
92 void OutputJsonPair(FILE *output, const K &key, const T &value, bool first = false)
95 if (fprintf(output, ",") < 0) {
100 OutputJsonKey(output, key);
102 OutputJsonValue(output, value);
109 void OutputJsonVectorList(FILE *output, const std::string &key, const std::vector<T> &value,
113 if (fprintf(output, ",") < 0) {
117 if (fprintf(output, "\"%s\":[", key.c_str()) != -1) {
120 OutputJsonValue(output, *it, it == value.begin());
123 if (fprintf(output, "]") < 0) {
133 void OutputJsonMapList(FILE *output, const std::string &key, const std::map<K, V> &value,
137 if (fprintf(output, ",") < 0) {
141 if (fprintf(output, "\"%s\":[", key.c_str()) != -1) {
144 OutputJsonValue(output, it->second, it == value.begin());
147 if (fprintf(output, "]") < 0) {
157 void OutputJsonMap(FILE *output, const std::string &key, const std::map<K, V> &value,
161 if (fprintf(output, ",") < 0) {
165 if (fprintf(output, "\"%s\":{", key.c_str()) != -1) {
168 OutputJsonPair(output, it->first, it->second, it == value.begin());
171 if (fprintf(output, "}") < 0) {
190 void OutputJson(FILE *output) const
192 if (fprintf(output, "{") < 0) {
195 OutputJsonPair(output, "file", libId_, true);
196 OutputJsonPair(output, "symbol", funcName_);
197 if (fprintf(output, "}") < 0) {
212 void OutputJson(FILE *output) const
214 if (fprintf(output, "{") < 0) {
217 OutputJsonPair(output, "symbol", functionId_, true);
218 OutputJsonVectorList(output, "counts",
220 if (fprintf(output, "}") < 0) {
236 void OutputJson(FILE *output) const
238 if (fprintf(output, "{") < 0) {
241 OutputJsonPair(output, "selfEvents", selfEventCount_, true);
242 OutputJsonPair(output, "subEvents", subTreeEventCount_);
243 OutputJsonPair(output, "symbol", functionId_);
245 OutputJsonPair(output, "funcName", funcName_);
246 OutputJsonPair(output, "nodeIndex", nodeIndex_);
247 OutputJsonPair(output, "reversed", reverseCaller_);
249 OutputJsonMapList(output, "callStack", childrenMap);
250 if (fprintf(output, "}") < 0) {
278 void OutputJson(FILE *output) const
280 if (fprintf(output, "{") < 0) {
283 OutputJsonPair(output, "fileId", libId_, true);
284 OutputJsonPair(output, "eventCount", eventCount_);
285 OutputJsonMapList(output, "functions", funcs_);
286 if (fprintf(output, "}") < 0) {
299 void OutputJson(FILE *output) const
301 if (fprintf(output, "{") < 0) {
304 OutputJsonPair(output, "tid", tid_, true);
305 OutputJsonPair(output, "eventCount", eventCount_);
306 OutputJsonPair(output, "sampleCount", sampleCount_);
307 OutputJsonMapList(output, "libs", libs_);
308 OutputJsonPair(output, "CallOrder", callNode);
309 OutputJsonPair(output, "CalledOrder", callNodeReverse);
310 if (fprintf(output, "}") < 0) {
321 void OutputJson(FILE *output) const
323 if (fprintf(output, "{") < 0) {
326 OutputJsonPair(output, "pid", pid_, true);
327 OutputJsonPair(output, "eventCount", eventCount_);
328 OutputJsonMapList(output, "threads", threads_);
329 if (fprintf(output, "}") < 0) {
341 void OutputJson(FILE *output) const
343 if (fprintf(output, "{") < 0) {
346 OutputJsonPair(output, "eventConfigName", eventName_, true);
347 OutputJsonPair(output, "eventCount", eventCount_);
348 OutputJsonMapList(output, "processes", processes_);
349 if (fprintf(output, "}") < 0) {
377 bool OutputJson(FILE *output = nullptr);
388 void OutputJsonFunctionMap(FILE *output);