Commit f9fc748f authored by Alastair Robertson's avatar Alastair Robertson

Rename namespace ::ebpf::bpftrace -> ::bpftrace

parent 978af8b6
#include "ast.h" #include "ast.h"
#include "parser.tab.hh" #include "parser.tab.hh"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -56,22 +55,22 @@ void Program::accept(Visitor &v) { ...@@ -56,22 +55,22 @@ void Program::accept(Visitor &v) {
std::string opstr(Binop &binop) std::string opstr(Binop &binop)
{ {
switch (binop.op) { switch (binop.op) {
case ebpf::bpftrace::Parser::token::EQ: return "=="; case bpftrace::Parser::token::EQ: return "==";
case ebpf::bpftrace::Parser::token::NE: return "!="; case bpftrace::Parser::token::NE: return "!=";
case ebpf::bpftrace::Parser::token::LE: return "<="; case bpftrace::Parser::token::LE: return "<=";
case ebpf::bpftrace::Parser::token::GE: return ">="; case bpftrace::Parser::token::GE: return ">=";
case ebpf::bpftrace::Parser::token::LT: return "<"; case bpftrace::Parser::token::LT: return "<";
case ebpf::bpftrace::Parser::token::GT: return ">"; case bpftrace::Parser::token::GT: return ">";
case ebpf::bpftrace::Parser::token::LAND: return "&&"; case bpftrace::Parser::token::LAND: return "&&";
case ebpf::bpftrace::Parser::token::LOR: return "||"; case bpftrace::Parser::token::LOR: return "||";
case ebpf::bpftrace::Parser::token::PLUS: return "+"; case bpftrace::Parser::token::PLUS: return "+";
case ebpf::bpftrace::Parser::token::MINUS: return "-"; case bpftrace::Parser::token::MINUS: return "-";
case ebpf::bpftrace::Parser::token::MUL: return "*"; case bpftrace::Parser::token::MUL: return "*";
case ebpf::bpftrace::Parser::token::DIV: return "/"; case bpftrace::Parser::token::DIV: return "/";
case ebpf::bpftrace::Parser::token::MOD: return "%"; case bpftrace::Parser::token::MOD: return "%";
case ebpf::bpftrace::Parser::token::BAND: return "&"; case bpftrace::Parser::token::BAND: return "&";
case ebpf::bpftrace::Parser::token::BOR: return "|"; case bpftrace::Parser::token::BOR: return "|";
case ebpf::bpftrace::Parser::token::BXOR: return "^"; case bpftrace::Parser::token::BXOR: return "^";
default: abort(); default: abort();
} }
} }
...@@ -79,12 +78,11 @@ std::string opstr(Binop &binop) ...@@ -79,12 +78,11 @@ std::string opstr(Binop &binop)
std::string opstr(Unop &unop) std::string opstr(Unop &unop)
{ {
switch (unop.op) { switch (unop.op) {
case ebpf::bpftrace::Parser::token::LNOT: return "!"; case bpftrace::Parser::token::LNOT: return "!";
case ebpf::bpftrace::Parser::token::BNOT: return "~"; case bpftrace::Parser::token::BNOT: return "~";
default: abort(); default: abort();
} }
} }
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -158,4 +157,3 @@ std::string opstr(Unop &unop); ...@@ -158,4 +157,3 @@ std::string opstr(Unop &unop);
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "libbpf.h" #include "libbpf.h"
#include "perf_reader.h" #include "perf_reader.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
AttachedProbe::AttachedProbe(Probe &probe, std::tuple<uint8_t *, uintptr_t> &func) AttachedProbe::AttachedProbe(Probe &probe, std::tuple<uint8_t *, uintptr_t> &func)
...@@ -102,4 +101,3 @@ void AttachedProbe::attach_kprobe() ...@@ -102,4 +101,3 @@ void AttachedProbe::attach_kprobe()
} }
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "bpftrace.h" #include "bpftrace.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
class AttachedProbe class AttachedProbe
...@@ -25,4 +24,3 @@ private: ...@@ -25,4 +24,3 @@ private:
}; };
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "bpftrace.h" #include "bpftrace.h"
#include "attached_probe.h" #include "attached_probe.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
int BPFtrace::add_probe(ast::Probe &p) int BPFtrace::add_probe(ast::Probe &p)
...@@ -233,4 +232,3 @@ int BPFtrace::print_quantize(std::vector<uint64_t> values) ...@@ -233,4 +232,3 @@ int BPFtrace::print_quantize(std::vector<uint64_t> values)
} }
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "map.h" #include "map.h"
#include "types.h" #include "types.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
class BPFtrace class BPFtrace
...@@ -30,4 +29,3 @@ private: ...@@ -30,4 +29,3 @@ private:
}; };
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <llvm/Transforms/IPO.h> #include <llvm/Transforms/IPO.h>
#include <llvm/Transforms/IPO/PassManagerBuilder.h> #include <llvm/Transforms/IPO/PassManagerBuilder.h>
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -73,22 +72,22 @@ void CodegenLLVM::visit(Binop &binop) ...@@ -73,22 +72,22 @@ void CodegenLLVM::visit(Binop &binop)
rhs = expr_; rhs = expr_;
switch (binop.op) { switch (binop.op) {
case ebpf::bpftrace::Parser::token::EQ: expr_ = b_.CreateICmpEQ (lhs, rhs); break; case bpftrace::Parser::token::EQ: expr_ = b_.CreateICmpEQ (lhs, rhs); break;
case ebpf::bpftrace::Parser::token::NE: expr_ = b_.CreateICmpNE (lhs, rhs); break; case bpftrace::Parser::token::NE: expr_ = b_.CreateICmpNE (lhs, rhs); break;
case ebpf::bpftrace::Parser::token::LE: expr_ = b_.CreateICmpSLE(lhs, rhs); break; case bpftrace::Parser::token::LE: expr_ = b_.CreateICmpSLE(lhs, rhs); break;
case ebpf::bpftrace::Parser::token::GE: expr_ = b_.CreateICmpSGE(lhs, rhs); break; case bpftrace::Parser::token::GE: expr_ = b_.CreateICmpSGE(lhs, rhs); break;
case ebpf::bpftrace::Parser::token::LT: expr_ = b_.CreateICmpSLT(lhs, rhs); break; case bpftrace::Parser::token::LT: expr_ = b_.CreateICmpSLT(lhs, rhs); break;
case ebpf::bpftrace::Parser::token::GT: expr_ = b_.CreateICmpSGT(lhs, rhs); break; case bpftrace::Parser::token::GT: expr_ = b_.CreateICmpSGT(lhs, rhs); break;
case ebpf::bpftrace::Parser::token::LAND: abort();// TODO case bpftrace::Parser::token::LAND: abort();// TODO
case ebpf::bpftrace::Parser::token::LOR: abort();// TODO case bpftrace::Parser::token::LOR: abort();// TODO
case ebpf::bpftrace::Parser::token::PLUS: expr_ = b_.CreateAdd (lhs, rhs); break; case bpftrace::Parser::token::PLUS: expr_ = b_.CreateAdd (lhs, rhs); break;
case ebpf::bpftrace::Parser::token::MINUS: expr_ = b_.CreateSub (lhs, rhs); break; case bpftrace::Parser::token::MINUS: expr_ = b_.CreateSub (lhs, rhs); break;
case ebpf::bpftrace::Parser::token::MUL: expr_ = b_.CreateMul (lhs, rhs); break; case bpftrace::Parser::token::MUL: expr_ = b_.CreateMul (lhs, rhs); break;
case ebpf::bpftrace::Parser::token::DIV: expr_ = b_.CreateSDiv (lhs, rhs); break; // TODO signed/unsigned case bpftrace::Parser::token::DIV: expr_ = b_.CreateSDiv (lhs, rhs); break; // TODO signed/unsigned
case ebpf::bpftrace::Parser::token::MOD: expr_ = b_.CreateURem (lhs, rhs); break; // TODO signed/unsigned case bpftrace::Parser::token::MOD: expr_ = b_.CreateURem (lhs, rhs); break; // TODO signed/unsigned
case ebpf::bpftrace::Parser::token::BAND: expr_ = b_.CreateAnd (lhs, rhs); break; case bpftrace::Parser::token::BAND: expr_ = b_.CreateAnd (lhs, rhs); break;
case ebpf::bpftrace::Parser::token::BOR: expr_ = b_.CreateOr (lhs, rhs); break; case bpftrace::Parser::token::BOR: expr_ = b_.CreateOr (lhs, rhs); break;
case ebpf::bpftrace::Parser::token::BXOR: expr_ = b_.CreateXor (lhs, rhs); break; case bpftrace::Parser::token::BXOR: expr_ = b_.CreateXor (lhs, rhs); break;
default: abort(); default: abort();
} }
} }
...@@ -98,8 +97,8 @@ void CodegenLLVM::visit(Unop &unop) ...@@ -98,8 +97,8 @@ void CodegenLLVM::visit(Unop &unop)
unop.expr->accept(*this); unop.expr->accept(*this);
switch (unop.op) { switch (unop.op) {
case ebpf::bpftrace::Parser::token::LNOT: expr_ = b_.CreateNot(expr_); break; case bpftrace::Parser::token::LNOT: expr_ = b_.CreateNot(expr_); break;
case ebpf::bpftrace::Parser::token::BNOT: expr_ = b_.CreateNeg(expr_); break; case bpftrace::Parser::token::BNOT: expr_ = b_.CreateNeg(expr_); break;
default: abort(); default: abort();
} }
} }
...@@ -354,4 +353,3 @@ int CodegenLLVM::compile(bool debug) ...@@ -354,4 +353,3 @@ int CodegenLLVM::compile(bool debug)
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <llvm/IR/IRBuilder.h> #include <llvm/IR/IRBuilder.h>
#include <llvm/IR/Module.h> #include <llvm/IR/Module.h>
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -54,4 +53,3 @@ private: ...@@ -54,4 +53,3 @@ private:
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
extern FILE *yyin; extern FILE *yyin;
extern void *yy_scan_string(const char *yystr); extern void *yy_scan_string(const char *yystr);
namespace ebpf {
namespace bpftrace { namespace bpftrace {
int Driver::parse_stdin() int Driver::parse_stdin()
...@@ -33,4 +32,3 @@ int Driver::parse_file(const std::string &f) ...@@ -33,4 +32,3 @@ int Driver::parse_file(const std::string &f)
} }
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
#include "ast.h" #include "ast.h"
#include "parser.tab.hh" #include "parser.tab.hh"
#define YY_DECL ebpf::bpftrace::Parser::symbol_type yylex(ebpf::bpftrace::Driver &driver) #define YY_DECL bpftrace::Parser::symbol_type yylex(bpftrace::Driver &driver)
YY_DECL; YY_DECL;
namespace ebpf {
namespace bpftrace { namespace bpftrace {
class Driver { class Driver {
...@@ -34,4 +33,3 @@ private: ...@@ -34,4 +33,3 @@ private:
}; };
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#include <llvm/IR/Module.h> #include <llvm/IR/Module.h>
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -146,4 +145,3 @@ CallInst *IRBuilderBPF::CreateGetUidGid() ...@@ -146,4 +145,3 @@ CallInst *IRBuilderBPF::CreateGetUidGid()
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include <llvm/IR/IRBuilder.h> #include <llvm/IR/IRBuilder.h>
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -33,4 +32,3 @@ private: ...@@ -33,4 +32,3 @@ private:
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
#undef yywrap #undef yywrap
#define yywrap() 1 #define yywrap() 1
static ebpf::bpftrace::location loc; static bpftrace::location loc;
#define YY_USER_ACTION loc.columns(yyleng); #define YY_USER_ACTION loc.columns(yyleng);
#define yyterminate() return ebpf::bpftrace::Parser::make_END(loc) #define yyterminate() return bpftrace::Parser::make_END(loc)
using namespace ebpf::bpftrace; using namespace bpftrace;
%} %}
ident [_a-zA-Z][_a-zA-Z0-9]* ident [_a-zA-Z][_a-zA-Z0-9]*
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "printer.h" #include "printer.h"
#include "semantic_analyser.h" #include "semantic_analyser.h"
using namespace ebpf::bpftrace; using namespace bpftrace;
void usage() void usage()
{ {
...@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) ...@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
if (debug) if (debug)
{ {
ast::Printer p = ebpf::bpftrace::ast::Printer(std::cout); ast::Printer p = bpftrace::ast::Printer(std::cout);
driver.root_->accept(p); driver.root_->accept(p);
} }
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "map.h" #include "map.h"
#include "libbpf.h" #include "libbpf.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
Map::Map(std::string &name, Type type, std::vector<Type> &args) Map::Map(std::string &name, Type type, std::vector<Type> &args)
...@@ -50,4 +49,3 @@ Map::~Map() ...@@ -50,4 +49,3 @@ Map::~Map()
} }
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "types.h" #include "types.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
class Map { class Map {
...@@ -23,4 +22,3 @@ public: ...@@ -23,4 +22,3 @@ public:
}; };
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
%skeleton "lalr1.cc" %skeleton "lalr1.cc"
%require "3.0.4" %require "3.0.4"
%defines %defines
%define api.namespace { ebpf::bpftrace } %define api.namespace { bpftrace }
%define parser_class_name { Parser } %define parser_class_name { Parser }
%define api.token.constructor %define api.token.constructor
...@@ -10,20 +10,18 @@ ...@@ -10,20 +10,18 @@
%define parse.error verbose %define parse.error verbose
%param { ebpf::bpftrace::Driver &driver } %param { bpftrace::Driver &driver }
%locations %locations
// Forward declarations of classes referenced in the parser // Forward declarations of classes referenced in the parser
%code requires %code requires
{ {
namespace ebpf {
namespace bpftrace { namespace bpftrace {
class Driver; class Driver;
namespace ast { namespace ast {
class Node; class Node;
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
#include "ast.h" #include "ast.h"
} }
...@@ -32,7 +30,7 @@ class Node; ...@@ -32,7 +30,7 @@ class Node;
#include "driver.h" #include "driver.h"
void yyerror(ebpf::bpftrace::Driver &driver, const char *s); void yyerror(bpftrace::Driver &driver, const char *s);
%} %}
%token %token
...@@ -159,7 +157,7 @@ vargs : vargs "," expr { $$ = $1; $1->push_back($3); } ...@@ -159,7 +157,7 @@ vargs : vargs "," expr { $$ = $1; $1->push_back($3); }
%% %%
void ebpf::bpftrace::Parser::error(const location &l, const std::string &m) void bpftrace::Parser::error(const location &l, const std::string &m)
{ {
driver.error(l, m); driver.error(l, m);
} }
#include "printer.h" #include "printer.h"
#include "ast.h" #include "ast.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -134,4 +133,3 @@ void Printer::visit(Program &program) ...@@ -134,4 +133,3 @@ void Printer::visit(Program &program)
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#include <ostream> #include <ostream>
#include "ast.h" #include "ast.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -32,4 +31,3 @@ private: ...@@ -32,4 +31,3 @@ private:
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "ast.h" #include "ast.h"
#include "parser.tab.hh" #include "parser.tab.hh"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -236,7 +235,7 @@ int SemanticAnalyser::create_maps() ...@@ -236,7 +235,7 @@ int SemanticAnalyser::create_maps()
abort(); abort();
auto &args = search_args->second; auto &args = search_args->second;
bpftrace_.maps_[map_name] = std::make_unique<ebpf::bpftrace::Map>(map_name, type, args); bpftrace_.maps_[map_name] = std::make_unique<bpftrace::Map>(map_name, type, args);
} }
return 0; return 0;
...@@ -249,4 +248,3 @@ bool SemanticAnalyser::is_final_pass() const ...@@ -249,4 +248,3 @@ bool SemanticAnalyser::is_final_pass() const
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "map.h" #include "map.h"
#include "types.h" #include "types.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
namespace ast { namespace ast {
...@@ -42,7 +41,7 @@ private: ...@@ -42,7 +41,7 @@ private:
int pass_; int pass_;
const int num_passes_ = 10; const int num_passes_ = 10;
using Type = ebpf::bpftrace::Type; using Type = bpftrace::Type;
Type type_; Type type_;
bool is_final_pass() const; bool is_final_pass() const;
...@@ -53,4 +52,3 @@ private: ...@@ -53,4 +52,3 @@ private:
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "types.h" #include "types.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
std::ostream &operator<<(std::ostream &os, Type type) std::ostream &operator<<(std::ostream &os, Type type)
...@@ -44,4 +43,3 @@ bpf_prog_type progtype(ProbeType t) ...@@ -44,4 +43,3 @@ bpf_prog_type progtype(ProbeType t)
} }
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "libbpf.h" #include "libbpf.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
enum class Type enum class Type
...@@ -64,4 +63,3 @@ std::string argument_list(const std::vector<T> &items, bool show_empty=false) ...@@ -64,4 +63,3 @@ std::string argument_list(const std::vector<T> &items, bool show_empty=false)
} }
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "parser.tab.hh" #include "parser.tab.hh"
#include "semantic_analyser.h" #include "semantic_analyser.h"
namespace ebpf {
namespace bpftrace { namespace bpftrace {
class MockBPFtrace : public BPFtrace { class MockBPFtrace : public BPFtrace {
...@@ -32,7 +31,7 @@ TEST(semantic_analyser, probe_count) ...@@ -32,7 +31,7 @@ TEST(semantic_analyser, probe_count)
ProbeList pl = {&p1, &p2}; ProbeList pl = {&p1, &p2};
Program root(&pl); Program root(&pl);
ebpf::bpftrace::ast::SemanticAnalyser semantics(&root, bpftrace); bpftrace::ast::SemanticAnalyser semantics(&root, bpftrace);
semantics.analyse(); semantics.analyse();
} }
...@@ -45,7 +44,7 @@ TEST(semantic_analyser, undefined_map) ...@@ -45,7 +44,7 @@ TEST(semantic_analyser, undefined_map)
std::string mapstr1 = "mymap1"; std::string mapstr1 = "mymap1";
Integer myint(123); Integer myint(123);
Map map1(mapstr1); Map map1(mapstr1);
Binop binop(&map1, ebpf::bpftrace::Parser::token::EQ, &myint); Binop binop(&map1, bpftrace::Parser::token::EQ, &myint);
Predicate pred(&binop); Predicate pred(&binop);
ExprStatement stmt(&myint); ExprStatement stmt(&myint);
StatementList stmts = {&stmt}; StatementList stmts = {&stmt};
...@@ -54,7 +53,7 @@ TEST(semantic_analyser, undefined_map) ...@@ -54,7 +53,7 @@ TEST(semantic_analyser, undefined_map)
Program root(&pl); Program root(&pl);
std::ostringstream out1; std::ostringstream out1;
ebpf::bpftrace::ast::SemanticAnalyser semantics1(&root, bpftrace, out1); bpftrace::ast::SemanticAnalyser semantics1(&root, bpftrace, out1);
EXPECT_EQ(semantics1.analyse(), 10); EXPECT_EQ(semantics1.analyse(), 10);
// kprobe:kprobe / @mymap1 == 123 / { 123; @mymap1 = @mymap2; } // kprobe:kprobe / @mymap1 == 123 / { 123; @mymap1 = @mymap2; }
...@@ -64,10 +63,9 @@ TEST(semantic_analyser, undefined_map) ...@@ -64,10 +63,9 @@ TEST(semantic_analyser, undefined_map)
stmts.push_back(&assign); stmts.push_back(&assign);
std::ostringstream out2; std::ostringstream out2;
ebpf::bpftrace::ast::SemanticAnalyser semantics2(&root, bpftrace, out2); bpftrace::ast::SemanticAnalyser semantics2(&root, bpftrace, out2);
EXPECT_EQ(semantics2.analyse(), 10); EXPECT_EQ(semantics2.analyse(), 10);
} }
} // namespace ast } // namespace ast
} // namespace bpftrace } // namespace bpftrace
} // namespace ebpf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment