X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=doc%2Fexamples%2Feasy-ust%2Fsample.c;h=101d10d79d0b24b1075ff4b3ecbba98b0c1842b6;hb=88c7c4eacbd4a98ad8e5df341ae2f1223b735194;hp=ddc4de699f791489ec48f4b52b11ea8e18a33e1b;hpb=9d36f30e825135d8fbb3ba6cb31ab10aa938b135;p=lttng-ust.git diff --git a/doc/examples/easy-ust/sample.c b/doc/examples/easy-ust/sample.c index ddc4de69..101d10d7 100644 --- a/doc/examples/easy-ust/sample.c +++ b/doc/examples/easy-ust/sample.c @@ -1,33 +1,25 @@ /* - * Copyright (C) 2011-2012 Matthew Khouzam - * Copyright (C) 2012 Mathieu Desnoyers + * SPDX-License-Identifier: MIT * - * 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. + * Copyright (C) 2011-2012 Matthew Khouzam + * Copyright (C) 2012 Mathieu Desnoyers */ - + #include /* - * We need to define TRACEPOINT_DEFINE in one C file in the program + * We need to define LTTNG_UST_TRACEPOINT_DEFINE in one C file in the program * before including provider headers. */ -#define TRACEPOINT_DEFINE +#define LTTNG_UST_TRACEPOINT_DEFINE #include "sample_component_provider.h" -int main(int argc, char **argv) +int main(void) { int i = 0; for (i = 0; i < 100000; i++) { - tracepoint(sample_component, message, "Hello World"); + lttng_ust_tracepoint(sample_component, message, "Hello World"); usleep(1); } return 0;