summaryrefslogtreecommitdiff
path: root/sys/src/cmd/dtracy/dat.h
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2018-12-08 15:07:53 +0000
committeraiju <devnull@localhost>2018-12-08 15:07:53 +0000
commit58fa29447b845f91dfc2a6734f525ed47375393b (patch)
treee2ee80e7728e26bc74e1f667ea48968b11a24fc6 /sys/src/cmd/dtracy/dat.h
parent03e60450c2acc20866867cc5d3649aaed07d0326 (diff)
dtracy: add support for aggregations
Diffstat (limited to 'sys/src/cmd/dtracy/dat.h')
-rw-r--r--sys/src/cmd/dtracy/dat.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/src/cmd/dtracy/dat.h b/sys/src/cmd/dtracy/dat.h
index fc6737b4c..5087a609e 100644
--- a/sys/src/cmd/dtracy/dat.h
+++ b/sys/src/cmd/dtracy/dat.h
@@ -5,6 +5,7 @@ typedef struct Clause Clause;
typedef struct Enab Enab;
typedef struct Stat Stat;
typedef struct Type Type;
+typedef struct Agg Agg;
enum {
SYMHASH = 256,
@@ -89,10 +90,19 @@ struct Stat {
STATEXPR,
STATPRINT,
STATPRINTF,
+ STATAGG,
} type;
+ /* STATEXPR */
Node *n;
+ /* STATPRINT, STATPRINTF */
int narg;
Node **arg;
+ /* STATAGG */
+ struct {
+ Symbol *name;
+ int type;
+ Node *key, *value;
+ } agg;
};
struct Clause {
@@ -112,6 +122,11 @@ struct Enab {
Enab *next;
};
+struct Agg {
+ DTAgg;
+ char *name;
+};
+
extern int errors;
#pragma varargck type "α" int
@@ -121,3 +136,6 @@ extern int errors;
#pragma varargck argpos error 1
extern int dflag;
+extern DTAgg noagg;
+extern int aggid;
+extern Agg *aggs;