X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=filter-bytecode.h;h=09cea497e736ee587b95a70bc4976c9ca165aea3;hb=30e736e5c2121dfb03abda8e108623fef7da85c0;hp=931daa9726c839da2c402b0da34a7604813b0ba0;hpb=3834b99f4341209754c4955ec853dc250b33ed4b;p=lttng-modules.git diff --git a/filter-bytecode.h b/filter-bytecode.h index 931daa97..09cea497 100644 --- a/filter-bytecode.h +++ b/filter-bytecode.h @@ -1,32 +1,15 @@ -#ifndef _FILTER_BYTECODE_H -#define _FILTER_BYTECODE_H - -/* +/* SPDX-License-Identifier: MIT + * * filter-bytecode.h * * LTTng filter bytecode * * Copyright 2012-2016 - Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. */ +#ifndef _FILTER_BYTECODE_H +#define _FILTER_BYTECODE_H + /* * offsets are absolute from start of bytecode. */ @@ -57,10 +40,6 @@ struct literal_double { double v; } __attribute__((packed)); -struct literal_string { - char string[0]; -} __attribute__((packed)); - enum filter_op { FILTER_OP_UNKNOWN = 0, @@ -72,8 +51,8 @@ enum filter_op { FILTER_OP_MOD = 4, FILTER_OP_PLUS = 5, FILTER_OP_MINUS = 6, - FILTER_OP_RSHIFT = 7, - FILTER_OP_LSHIFT = 8, + FILTER_OP_BIT_RSHIFT = 7, + FILTER_OP_BIT_LSHIFT = 8, FILTER_OP_BIT_AND = 9, FILTER_OP_BIT_OR = 10, FILTER_OP_BIT_XOR = 11, @@ -202,6 +181,10 @@ enum filter_op { FILTER_OP_LOAD_FIELD_SEQUENCE = 96, FILTER_OP_LOAD_FIELD_DOUBLE = 97, + FILTER_OP_UNARY_BIT_NOT = 98, + + FILTER_OP_RETURN_S64 = 99, + NR_FILTER_OPS, }; @@ -209,7 +192,7 @@ typedef uint8_t filter_opcode_t; struct load_op { filter_opcode_t op; - char data[0]; + char data[]; /* data to load. Size known by enum filter_opcode and null-term char. */ } __attribute__((packed));