Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160489873
D56017.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D56017.diff
View Options
diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c
--- a/lib/libpmc/pmu-events/jevents.c
+++ b/lib/libpmc/pmu-events/jevents.c
@@ -71,8 +71,11 @@
char *perpkg;
char *aggr_mode;
char *metric_expr;
+ char *metric_threshold;
char *metric_name;
char *metric_group;
+ char *metric_group_nogroup;
+ char *default_metric_group;
char *deprecated;
char *metric_constraint;
};
@@ -379,10 +382,16 @@
fprintf(outfp, "\t.aggr_mode = \"%d\",\n", convert(je->aggr_mode));
if (je->metric_expr)
fprintf(outfp, "\t.metric_expr = \"%s\",\n", je->metric_expr);
+ if (je->metric_threshold)
+ fprintf(outfp, "\t.metric_threshold = \"%s\",\n", je->metric_threshold);
if (je->metric_name)
fprintf(outfp, "\t.metric_name = \"%s\",\n", je->metric_name);
if (je->metric_group)
fprintf(outfp, "\t.metric_group = \"%s\",\n", je->metric_group);
+ if (je->metric_group_nogroup)
+ fprintf(outfp, "\t.metric_group_nogroup = \"%s\",\n", je->metric_group_nogroup);
+ if (je->default_metric_group)
+ fprintf(outfp, "\t.default_metric_group = \"%s\",\n", je->default_metric_group);
if (je->deprecated)
fprintf(outfp, "\t.deprecated = \"%s\",\n", je->deprecated);
if (je->metric_constraint)
@@ -404,8 +413,11 @@
char *perpkg;
char *aggr_mode;
char *metric_expr;
+ char *metric_threshold;
char *metric_name;
char *metric_group;
+ char *metric_group_nogroup;
+ char *default_metric_group;
char *deprecated;
char *metric_constraint;
};
@@ -434,8 +446,11 @@
op(perpkg); \
op(aggr_mode); \
op(metric_expr); \
+ op(metric_threshold); \
op(metric_name); \
op(metric_group); \
+ op(metric_group_nogroup); \
+ op(default_metric_group); \
op(deprecated); \
} while (0)
@@ -711,10 +726,16 @@
addfield(map, &je.metric_name, "", "", val);
} else if (json_streq(map, field, "MetricGroup")) {
addfield(map, &je.metric_group, "", "", val);
+ } else if (json_streq(map, field, "MetricgroupNoGroup")) {
+ addfield(map, &je.metric_group_nogroup, "", "", val);
+ } else if (json_streq(map, field, "DefaultMetricgroupName")) {
+ addfield(map, &je.default_metric_group, "", "", val);
} else if (json_streq(map, field, "MetricConstraint")) {
addfield(map, &je.metric_constraint, "", "", val);
} else if (json_streq(map, field, "MetricExpr")) {
addfield(map, &je.metric_expr, "", "", val);
+ } else if (json_streq(map, field, "MetricThreshold")) {
+ addfield(map, &je.metric_threshold, "", "", val);
} else if (json_streq(map, field, "ArchStdEvent")) {
addfield(map, &arch_std, "", "", val);
for (s = arch_std; *s; s++)
@@ -866,8 +887,11 @@
free(je.deprecated);
free(je.unit);
free(je.metric_expr);
+ free(je.metric_threshold);
free(je.metric_name);
free(je.metric_group);
+ free(je.metric_group_nogroup);
+ free(je.default_metric_group);
free(je.metric_constraint);
free(arch_std);
diff --git a/lib/libpmc/pmu-events/pmu-events.h b/lib/libpmc/pmu-events/pmu-events.h
--- a/lib/libpmc/pmu-events/pmu-events.h
+++ b/lib/libpmc/pmu-events/pmu-events.h
@@ -24,8 +24,11 @@
const char *perpkg;
const char *aggr_mode;
const char *metric_expr;
+ const char *metric_threshold;
const char *metric_name;
const char *metric_group;
+ const char *metric_group_nogroup;
+ const char *default_metric_group;
const char *deprecated;
const char *metric_constraint;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 26, 1:29 AM (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34335592
Default Alt Text
D56017.diff (3 KB)
Attached To
Mode
D56017: libpmc/pmu-events: Add support for new json fields
Attached
Detach File
Event Timeline
Log In to Comment