Merge branch 'dev'
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 5 Apr 2012 17:21:08 +0000 (13:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 5 Apr 2012 17:21:08 +0000 (13:21 -0400)
86 files changed:
COPYING
ChangeLog
README
configure.ac
doc/examples/easy-ust/sample.c
doc/examples/easy-ust/sample_component_provider.h
doc/examples/easy-ust/tp.c
doc/examples/gen-tp/sample.c
include/lttng/align.h
include/lttng/bug.h
include/lttng/ringbuffer-abi.h
include/lttng/ringbuffer-config.h
include/lttng/tracepoint-event.h
include/lttng/tracepoint-rcu.h
include/lttng/tracepoint-types.h
include/lttng/tracepoint.h
include/lttng/ust-abi.h
include/lttng/ust-ctl.h
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event-reset.h
include/lttng/ust-tracepoint-event.h
include/lttng/ust-tracer.h
include/lttng/ust.h
include/share.h
liblttng-ust-comm/lttng-ust-comm.c
liblttng-ust-ctl/ustctl.c
liblttng-ust-java/LTTNG_UST.c
liblttng-ust-java/LTTNG_UST.java
liblttng-ust-libc-wrapper/ust_libc.h
liblttng-ust/compat.h
liblttng-ust/ltt-context.c
liblttng-ust/ltt-events.c
liblttng-ust/ltt-probes.c
liblttng-ust/ltt-ring-buffer-client-discard.c
liblttng-ust/ltt-ring-buffer-client-overwrite.c
liblttng-ust/ltt-ring-buffer-client.h
liblttng-ust/ltt-ring-buffer-metadata-client.c
liblttng-ust/ltt-ring-buffer-metadata-client.h
liblttng-ust/lttng-context-procname.c
liblttng-ust/lttng-context-pthread-id.c
liblttng-ust/lttng-context-vpid.c
liblttng-ust/lttng-context-vtid.c
liblttng-ust/lttng-ust-abi.c
liblttng-ust/lttng-ust-comm.c
liblttng-ust/probes/lttng-probe-ust.c
libringbuffer/api.h
libringbuffer/backend.h
libringbuffer/backend_internal.h
libringbuffer/backend_types.h
libringbuffer/frontend.h
libringbuffer/frontend_api.h
libringbuffer/frontend_internal.h
libringbuffer/frontend_types.h
libringbuffer/getcpu.h
libringbuffer/nohz.h
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/shm.c
libringbuffer/shm.h
libringbuffer/shm_internal.h
libringbuffer/shm_types.h
libringbuffer/smp.c
libringbuffer/smp.h
libringbuffer/tlsfixup.h
libringbuffer/vatomic.h
tests/benchmark/bench.c
tests/demo/tp.c
tests/demo/tp2.c
tests/demo/tp3.c
tests/demo/ust_tests_demo.h
tests/demo/ust_tests_demo2.h
tests/demo/ust_tests_demo3.h
tests/fork/ust_tests_fork.h
tests/hello-static-lib/tp.c
tests/hello-static-lib/ust_tests_hello.h
tests/hello.cxx/tp.c
tests/hello.cxx/ust_tests_hello.h
tests/hello/tp.c
tests/hello/ust_tests_hello.h
tests/make_shared_lib/Makefile [deleted file]
tests/make_shared_lib/basic_lib.c [deleted file]
tests/make_shared_lib/prog.c [deleted file]
tests/tracepoint/tracepoint_test.h
tests/ust-basic-tracing/ust-basic-tracing.c
tests/ust-multi-test/ust-multi-test.c
tools/lttng-gen-tp

diff --git a/COPYING b/COPYING
index daf0fafa7604c521eeb425188e917278114eef98..4191b661db76a1189bb14430a8aef7649a0e2721 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,16 @@
-UST - Userspace Tracer
+LTTng UST - Userspace Tracer
 
-Copyright (C) 2009 Mathieu Desnoyers and others.
+Copyright (C) 2009-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 Copyright (C) 2010 Pierre-Marc Fournier, Nils Carlson, David Goulet and others.
 
+
+* This library is licensed under the LGPL v2.1 license, except when
+  specified otherwise.
+
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+License as published by the Free Software Foundation; only
+version 2.1 of the License.
 
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,3 +20,33 @@ Lesser General Public License for more details.
 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+
+
+* System headers are MIT-licensed (BSD style):
+
+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.
+
+
+* liblttng-ust-ctl/ustctl.c is GPL v2. It is only used by the
+  lttng-sessiond program.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License only.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
index 70c0c7d8ccf6044a64efd9c2fefd3850af7a3b12..7cafa1d09e0fb74503694909d669afd504167ddc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2012-03-29 lttng-ust 2.0.1
+       * Use bsd-compatible fcntl for close-on-exec on socket
+       * Fix multi-session wildcard support
+       * Fix event lost count when buffer is full
+       * Remove inappropriate \n from easy-ust sample
+
+2012-03-20 lttng-ust 2.0.0
+       * First STABLE version
+       * Add version name
+
+2012-03-20 lttng-ust 2.0.0-rc4
+       * Fix out-of-bound write in ltt-events.c
+       * Document LTTNG_UST_DEBUG_VALGRIND compilation flag
+       * Update COPYING
+       * Add exception handling to lttng-gen-tp io operations
+
+2012-03-16 lttng-ust 2.0.0-rc3
+       * Fix: sendmsg should retry on EINTR, and use MSG_NOSIGNAL
+       * fix: ustcomm_close_unix_sock should close, not shutdown
+       * Fix: do not print EPIPE perror, as it is an expected error
+       * Ensure that multiplication of clock offset is done on 64-bit
+       * Add 2 missing licenses in deprecated tests
+       * Remove unbuild and unused (deprecated) make_shared_lib test
+       * License text standardization, add missing licenses
+       * Cleanup: remove duplicate check for 0 num_subbuf and subbuf_size
+       * Fix: power of 2 size check should apply to size_t type, not uint32_t
+       * Fix: recvmsg should handle EINTR
+       * Make lttng-gen-tp work on python 2.6
+       * Make lttng-gen-tp executable
+
 2012-03-02 lttng-ust 2.0.0-rc2
        * Manpage fixes
        * Fix: dmesg printout should not print metadata warnings
diff --git a/README b/README
index 8193c6603837940ffc2cade120ef4dc867b638fe..52aebd8940c7cf01770f949beb944f2e63b54a1a 100644 (file)
--- a/README
+++ b/README
@@ -113,6 +113,10 @@ ENVIRONMENT VARIABLES:
     recommended for applications with time constraints on the process
     startup time.
 
+  - The compilation flag "-DLTTNG_UST_DEBUG_VALGRIND" should be enabled
+    at build time to allow liblttng-ust to be used with valgrind
+    (side-effect: disables per-cpu buffering).
+
 
 TRACE VIEWER:
 
index 6c21ac736c3c81e123cc617a70c38cdaf1fe9895..294d457524b153895200ed285f34d08df56810da 100644 (file)
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
-AC_INIT([lttng-ust],[2.0.0-rc2],[mathieu dot desnoyers at efficios dot com])
+AC_INIT([lttng-ust],[2.0.1],[mathieu dot desnoyers at efficios dot com])
 
 # Following the numbering scheme proposed by libtool for the library version
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
@@ -13,7 +13,7 @@ AC_CONFIG_AUX_DIR([config])
 AC_CANONICAL_TARGET
 AC_CANONICAL_HOST
 AC_CONFIG_MACRO_DIR([config])
-AM_INIT_AUTOMAKE([foreign])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_SRCDIR([include/lttng/tracepoint.h])
 
@@ -34,6 +34,10 @@ AC_DEFINE_UNQUOTED([VERSION_MAJOR], $major_version, [UST major version number])
 AC_DEFINE_UNQUOTED([VERSION_MINOR], $minor_version, [UST minor version number])
 AC_DEFINE_UNQUOTED([VERSION_PATCHLEVEL], $patchlevel_version, [UST patchlevel version number])
 
+version_name="Annedd'ale"
+version_description="New type of beer, 100% from Quebec, flavored with sapin beaumier needles, with a touch of hops."
+AC_DEFINE_UNQUOTED([VERSION_NAME], ["$version_name"], [UST version name])
+AC_DEFINE_UNQUOTED([VERSION_DESCRIPTION], ["$version_description"], [UST version description])
 
 # Checks for programs.
 AC_PROG_CC
@@ -312,6 +316,10 @@ AC_CONFIG_FILES([
 
 AC_OUTPUT
 
+AS_ECHO()
+AS_ECHO("Version name: $version_name")
+AS_ECHO("$version_description")
+
 # Report on the configuration options
 AS_ECHO()
 AS_ECHO("LTTng-UST will be built with the following options:")
index d030d700d2bff0489ed384fdcc48f222fad4fcf5..ddc4de699f791489ec48f4b52b11ea8e18a33e1b 100644 (file)
@@ -2,14 +2,15 @@
  * Copyright (C) 2011-2012  Matthew Khouzam <matthew.khouzam@ericsson.com> 
  * Copyright (C) 2012  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program for any
- * purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is
- * granted, provided the above notices are retained, and a notice that
- * the code was modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
  
 #include <unistd.h>
@@ -26,7 +27,7 @@ int main(int argc, char **argv)
        int i = 0;
 
        for (i = 0; i < 100000; i++) {
-               tracepoint(sample_component, message, "Hello World\n");
+               tracepoint(sample_component, message, "Hello World");
                usleep(1);
        }
        return 0;
index d63ff5a8a5a162f38ad418609c9191bc8c86eb9b..eefac0e6d8bf52c1094328913ede53e4c9a5d351 100644 (file)
@@ -2,14 +2,15 @@
  * Copyright (C) 2011-2012  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  * Copyright (C) 2011-2012  Matthew Khouzam <matthew.khouzam@ericsson.com> 
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program for any
- * purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is
- * granted, provided the above notices are retained, and a notice that
- * the code was modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
  
 /*
index bf8e4c3f54ec639f9fc5190abad40b70c4a7bd1d..94c98c213a7af544938a1973e96cf5c536a4331a 100644 (file)
@@ -3,14 +3,15 @@
  *
  * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program for any
- * purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is
- * granted, provided the above notices are retained, and a notice that
- * the code was modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 /*
index 729258c2c7874289aac188aac4104c996259af27..185ea3faa6428c2210ad7bcdfc98c10afffdd771 100644 (file)
@@ -2,15 +2,17 @@
  * Copyright (C) 2011-2012  Matthew Khouzam <matthew.khouzam@ericsson.com>
  * Copyright (C) 2012  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program for any
- * purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is
- * granted, provided the above notices are retained, and a notice that
- * the code was modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
+
 #include <unistd.h>
 
 #include "sample_tracepoint.h"
index 283926826d2c520999fecf57bf1bd43a6c2305c1..9154051e33e59363cf24ee77a065dd675ab976b6 100644 (file)
@@ -6,14 +6,15 @@
  *
  * (C) Copyright 2010-2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/bug.h>
index d0e59800ff0020ede9116400c1350f8d9797dc88..9368c08976a345ec4a45ca365bbfd01d2b55abd3 100644 (file)
@@ -6,14 +6,15 @@
  *
  * (C) Copyright 2010-2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <urcu/compiler.h>
index da6f813a8fa6212779892e77926690b7cbb4029b..9c8bc77ecf27c6d7b06861b1f04512d8728cb9bd 100644 (file)
@@ -1,24 +1,25 @@
-#ifndef _UST_RING_BUFFER_ABI_H
-#define _UST_RING_BUFFER_ABI_H
+#ifndef _LTTNG_RING_BUFFER_ABI_H
+#define _LTTNG_RING_BUFFER_ABI_H
 
 /*
- * ust/ringbuffer-abi.h
+ * lttng/ringbuffer-abi.h
  *
- * (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * (C) Copyright 2005-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * Wait-free ring buffer ABI.
  *
  * Author:
  *     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #define _UST_CMD(minor)                                (minor)
@@ -71,4 +72,4 @@
 /* flush the current sub-buffer */
 #define RING_BUFFER_FLUSH                      _UST_CMD(0x0C)
 
-#endif /* _UST_RING_BUFFER_ABI_H */
+#endif /* _LTTNG_RING_BUFFER_ABI_H */
index 5273f321af01be088e8634405545da3220137646..24fb1cc4c35cd9a51d1fcb9fae3733da358abb13 100644 (file)
@@ -1,22 +1,23 @@
-#ifndef _LINUX_RING_BUFFER_CONFIG_H
-#define _LINUX_RING_BUFFER_CONFIG_H
+#ifndef _LTTNG_RING_BUFFER_CONFIG_H
+#define _LTTNG_RING_BUFFER_CONFIG_H
 
 /*
- * linux/ringbuffer/config.h
+ * lttng/ringbuffer-config.h
  *
  * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * Ring buffer configuration header. Note: after declaring the standard inline
  * functions, clients should also include linux/ringbuffer/api.h.
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <errno.h>
@@ -324,4 +325,4 @@ int lib_ring_buffer_check_config(const struct lttng_ust_lib_ring_buffer_config *
        return 0;
 }
 
-#endif /* _LINUX_RING_BUFFER_CONFIG_H */
+#endif /* _LTTNG_RING_BUFFER_CONFIG_H */
index 9d757940d381a63b1ad8efd52562a893aa2de5b2..e7bcea92ea58d1912b15a4927f8e5b6b22f103dc 100644 (file)
@@ -1,14 +1,15 @@
 /*
  * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #ifdef __cplusplus
index 23dab7d6c9b47e9838e719d00a479dff315d4cfc..918837e1a162b553091441bf8e0cd02d2015f89c 100644 (file)
@@ -2,19 +2,17 @@
 #define _LTTNG_TRACEPOINT_RCU_H
 
 /*
- * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * This file allows weak linking on tracepoint RCU symbols for non-LGPL
- * code.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <urcu/compiler.h>
index 9b104b07be6698e927dc4362b200eb99b16d86d7..ee1cd78daba67274c1d82bb5d321240ed454bb95 100644 (file)
@@ -2,16 +2,17 @@
 #define _LTTNG_TRACEPOINT_TYPES_H
 
 /*
- * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 struct tracepoint_probe {
index b1c2d360feffb3de46aa53237ba4d5cd2843d416..4b773bbc2eead7a60e11415ead1d364e979afa6d 100644 (file)
@@ -2,16 +2,17 @@
 #define _LTTNG_TRACEPOINT_H
 
 /*
- * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint-types.h>
index f726c8b576e707a69a0cd3508f77c184d21706c4..b3af9bf49528d6e131d44c10ff86db59699e316f 100644 (file)
@@ -4,18 +4,19 @@
 /*
  * lttng/ust-abi.h
  *
- * Copyright 2010-2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng-UST ABI header
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * Copyright 2010-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <stdint.h>
index 1a4daaef5e8f7d1097253fd3e180b40c177195e6..10602ee73c4d3cf66433549b213c6c03ca6f2531 100644 (file)
@@ -2,19 +2,18 @@
  * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
  *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; only version 2
- * of the License.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License only.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifndef _LTTNG_UST_CTL_H
index f1ef8c91ee7f6f52cf6e7105147e0317c2dbc7a2..65f502360372638749d6ed77fcaa2d55d91b4344 100644 (file)
@@ -4,18 +4,19 @@
 /*
  * lttng/ust-events.h
  *
- * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * Holds LTTng per-session event registry.
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <urcu/list.h>
index 43ea1342aa89090b5bed454a67600cae17e6fe19..31a533d5dcff61d0d10e718eb499b81a15d98766 100644 (file)
@@ -1,14 +1,15 @@
 /*
  * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 /* Define to "nothing" all macros used for TRACEPOINT_EVENT */
index 1dffd94635364f84a5f7b9bdd9a28036403aa1fa..520f8c061e02c041b07ad54979eb12b0db51a3a5 100644 (file)
@@ -1,14 +1,15 @@
 /*
- * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (c) 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <stdio.h>
index 205af942c50ca456a2f211e6b481a1995dfb2a99..7b371953e272ca1d69d70bf59b4aa3160e13a487 100644 (file)
@@ -6,14 +6,17 @@
  *
  * This contains the core definitions for the Linux Trace Toolkit.
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * Copyright 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * 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.
  */
 
 #include <lttng/ust-config.h>
index 05f262be64e836acd960dfdff3bb0b501eb38d79..a7d67f591ca84676a1417877f0f8903685edd2b9 100644 (file)
@@ -2,16 +2,17 @@
 #define _LTTNG_UST_H
 
 /*
- * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (c) 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #ifdef __cplusplus
index 19644f120c0b194b79224088da9f69389986c9fc..4abd7b15f8c1678cbeeb97823731ad9728706270 100644 (file)
@@ -4,14 +4,15 @@
 /*
  * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <stdlib.h>
index 9baa4dc50d3a3a48fb429c1ce4e7026e5a1f5ae5..078b56a01bb68c49c2322fc2a8f454d597305314 100644 (file)
@@ -258,7 +258,7 @@ ssize_t ustcomm_recv_unix_sock(int sock, void *buf, size_t len)
        do {
                ret = recvmsg(sock, &msg, 0);
        } while (ret < 0 && errno == EINTR);
-       if (ret < 0) {
+       if (ret < 0 && errno != EPIPE) {
                perror("recvmsg");
        }
 
@@ -291,8 +291,10 @@ ssize_t ustcomm_send_unix_sock(int sock, void *buf, size_t len)
         * by ignoring SIGPIPE, but we don't have this luxury on the
         * libust side.
         */
-       ret = sendmsg(sock, &msg, MSG_NOSIGNAL);
-       if (ret < 0) {
+       do {
+               ret = sendmsg(sock, &msg, MSG_NOSIGNAL);
+       } while (ret < 0 && errno == EINTR);
+       if (ret < 0 && errno != EPIPE) {
                perror("sendmsg");
        }
 
@@ -308,10 +310,9 @@ int ustcomm_close_unix_sock(int sock)
 {
        int ret;
 
-       /* Shutdown receptions and transmissions */
-       ret = shutdown(sock, SHUT_RDWR);
+       ret = close(sock);
        if (ret < 0) {
-               perror("shutdown");
+               perror("close");
        }
 
        return ret;
@@ -355,8 +356,10 @@ ssize_t ustcomm_send_fds_unix_sock(int sock, void *buf, int *fds, size_t nb_fd,
        msg.msg_iov = iov;
        msg.msg_iovlen = 1;
 
-       ret = sendmsg(sock, &msg, 0);
-       if (ret < 0) {
+       do {
+               ret = sendmsg(sock, &msg, MSG_NOSIGNAL);
+       } while (ret < 0 && errno == EINTR);
+       if (ret < 0 && errno != EPIPE) {
                perror("sendmsg");
        }
 
@@ -475,7 +478,9 @@ int ustcomm_recv_fd(int sock)
                ret = recvmsg(sock, &msg, 0);
        } while (ret < 0 && errno == EINTR);
        if (ret < 0) {
-               perror("recvmsg");
+               if (errno != EPIPE) {
+                       perror("recvmsg");
+               }
                goto end;
        }
        if (ret != sizeof(data_fd)) {
index 5a025f2a682fd3b1c89a7b9bdf4cd69d5de28496..e4a29f99defbf4cf8b99a02b808c89e49a9cdf35 100644 (file)
@@ -2,19 +2,18 @@
  * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
  *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; only version 2
- * of the License.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License only.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #define _GNU_SOURCE
index 6051497049a056b5025ecfb6a6806363be1be2fa..af29c1e967c1d8d91a5f838bb07a56460085fd1c 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
 #include <jni.h>
 
 #define TRACEPOINT_DEFINE
index 33fa73aad32c1910076c6dcbb21fa81aea7f172e..7ec611034e1b7e5ea07728a4bcaf037ba4b5a503 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
 class LTTNG_UST {
        public static native void lttng_ust_java_string(String name, String arg);
        static {
index b40548fd7185c66fa0df5812b65d04fc455341c3..87c3fc67a14d84236204439fda3da172ab39387a 100644 (file)
@@ -11,14 +11,15 @@ extern "C" {
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
index 004e60ace8d86771652405c2076f555969bd12d8..58d8585c4823eb16c7343d256777d770f6773100 100644 (file)
@@ -2,16 +2,21 @@
 #define _UST_COMPAT_H
 
 /*
- * Copyright (C) 2011   Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /*
index 70578a26d993c3ab563e39234bc7f761e2c769ee..16894ec1032b722407ce578d43f47051a62bbc60 100644 (file)
@@ -1,13 +1,26 @@
 /*
- * ltt-context.c
- *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * lttng-context.c
  *
  * LTTng UST trace/channel/event context management.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include <helper.h>
index ac2b20f7938dbe8ff036b720d9be8427d6aba241..aafa126c47a064ff5e368af93236d7f66a4790d4 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * ltt-events.c
  *
- * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * Holds LTTng per-session event registry.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define _GNU_SOURCE
@@ -167,20 +179,20 @@ int add_pending_probe(struct ltt_event *event, const char *name,
 {
        struct cds_hlist_head *head;
        struct ust_pending_probe *e;
-       size_t name_len = strlen(name);
+       size_t name_len = strlen(name) + 1;
        uint32_t hash;
 
-       if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
-               WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
-               name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+       if (name_len > LTTNG_UST_SYM_NAME_LEN) {
+               WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN);
+               name_len = LTTNG_UST_SYM_NAME_LEN;
        }
-       hash = jhash(name, name_len, 0);
+       hash = jhash(name, name_len - 1, 0);
        head = &pending_probe_table[hash & (PENDING_PROBE_HASH_SIZE - 1)];
        e = zmalloc(sizeof(struct ust_pending_probe) + name_len);
        if (!e)
                return -ENOMEM;
-       memcpy(&e->name[0], name, name_len + 1);
-       e->name[name_len] = '\0';
+       memcpy(&e->name[0], name, name_len);
+       e->name[name_len - 1] = '\0';
        e->loglevel_type = loglevel_type;
        e->loglevel = loglevel;
        cds_hlist_add_head(&e->node, head);
@@ -216,7 +228,7 @@ int pending_probe_fix_events(const struct lttng_event_desc *desc)
        const char *name = desc->name;
        int ret = 0;
        struct lttng_ust_event event_param;
-       size_t name_len = strlen(name);
+       size_t name_len = strlen(name) + 1;
        uint32_t hash;
 
        /* Wildcard */
@@ -251,11 +263,11 @@ int pending_probe_fix_events(const struct lttng_event_desc *desc)
                }
        }
 
-       if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
-               WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
-               name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+       if (name_len > LTTNG_UST_SYM_NAME_LEN) {
+               WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN);
+               name_len = LTTNG_UST_SYM_NAME_LEN;
        }
-       hash = jhash(name, name_len, 0);
+       hash = jhash(name, name_len - 1, 0);
        head = &pending_probe_table[hash & (PENDING_PROBE_HASH_SIZE - 1)];
        cds_hlist_for_each_entry_safe(e, node, p, head, node) {
                struct ltt_event *event;
@@ -1078,7 +1090,7 @@ uint64_t measure_clock_offset(void)
                return 0;
        monotonic[1] = trace_clock_read64();
        offset = (monotonic[0] + monotonic[1]) >> 1;
-       realtime = rts.tv_sec * 1000000000ULL;
+       realtime = (uint64_t) rts.tv_sec * 1000000000ULL;
        realtime += rts.tv_nsec;
        offset = realtime - offset;
        return offset;
@@ -1347,6 +1359,8 @@ struct session_wildcard *add_wildcard(struct ltt_channel *chan,
                if (!e)
                        return ERR_PTR(-ENOMEM);
                memcpy(&e->name[0], event_param->name, name_len);
+               e->loglevel_type = event_param->loglevel_type;
+               e->loglevel = event_param->loglevel;
                cds_list_add(&e->list, &wildcard_list);
                CDS_INIT_LIST_HEAD(&e->session_list);
        }
index 0de5c6a48f2ed6b5a4b0fd71b068cac6519c4433..02df21b2f61c847e3ba082866577daa4c40c79bc 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * ltt-probes.c
  *
- * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * Holds LTTng probes registry.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright 2010-2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <string.h>
index a551ef9a9d3ff9ed2806fb0f7f37cca1d4bc3d72..416984d4f586ab26af7a10e736a7d89711cacf26 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * ltt-ring-buffer-client-discard.c
  *
- * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng lib ring buffer client (discard mode).
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define _GNU_SOURCE
index 27693a26597c0668ae9c4b46a61c6c69edd5f15d..de9d613a53f44c136f1dfdace39237f89db7b5f9 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * ltt-ring-buffer-client-overwrite.c
  *
- * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng lib ring buffer client (overwrite mode).
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define _GNU_SOURCE
index cedbc31d94a819e13f9e11cea68621b99bda66f3..f18b4ed387cdf876dffebd4ae41b7a808b57b55d 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * ltt-ring-buffer-client.h
  *
- * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng lib ring buffer client template.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <stdint.h>
@@ -355,11 +367,8 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts
        header->ctx.timestamp_end = tsc;
        header->ctx.content_size = data_size * CHAR_BIT;        /* in bits */
        header->ctx.packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */
-       /*
-        * We do not care about the records lost count, because the metadata
-        * channel waits and retry.
-        */
-       (void) lib_ring_buffer_get_records_lost_full(&client_config, buf);
+
+       records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf);
        header->ctx.events_discarded = records_lost;
index 9cf4c57966b3b0d92a98ca1f01cf3914c5554502..cc72a7feac081c4e7ced5f0e8b48cf753cf2e3da 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * ltt-ring-buffer-metadata-client.c
  *
- * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng lib ring buffer metadta client.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define _GNU_SOURCE
index dcbaacb61c1c1d583473ed367d4396e5de72bea9..acc56fddb890d172b8e2386977df7ce56f501adb 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * ltt-ring-buffer-client.h
  *
- * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng lib ring buffer client template.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <stdint.h>
@@ -119,7 +131,11 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts
 
        header->content_size = data_size * CHAR_BIT;            /* in bits */
        header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */
-       records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf);
+       /*
+        * We do not care about the records lost count, because the metadata
+        * channel waits and retry.
+        */
+       (void) lib_ring_buffer_get_records_lost_full(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf);
        records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf);
        WARN_ON_ONCE(records_lost != 0);
index b737084bf69aae013cee43c11e7ffa3484067ce5..d165be88277daada8bbb616c2db60572050f9aa2 100644 (file)
@@ -1,10 +1,23 @@
 /*
- * (C) Copyright       2009-2011 -
- *             Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * lttng-context-procname.c
  *
  * LTTng UST procname context.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2009-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <lttng/ust-events.h>
index 62eda808786d01b1cf7eb165d4915a0e909b6a40..44c60c3a0a4498f0fb350657049271599c9bb58d 100644 (file)
@@ -1,10 +1,23 @@
 /*
- * (C) Copyright       2009-2011 -
- *             Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * lttng-context-pthread-id.c
  *
  * LTTng UST pthread_id context.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2009-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <pthread.h>
index db76747a6445c9beb8cbd07ba0940b79fbb60e24..fdf68fb1d17e0df10d1892e7e3bb4dfbc1d1cae2 100644 (file)
@@ -1,10 +1,23 @@
 /*
- * (C) Copyright       2009-2011 -
- *             Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * lttng-context-vpid.c
  *
  * LTTng UST vpid context.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2009-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <sys/types.h>
index c419d18b3ede7db666d2c5ea3cada82df6dafcbd..81508515ba56c3dee817c92f34b4c5513a3df444 100644 (file)
@@ -1,10 +1,23 @@
 /*
- * (C) Copyright       2009-2011 -
- *             Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * lttng-context-vtid.c
  *
  * LTTng UST vtid context.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2009-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <sys/types.h>
index deb3311b882ca7dd682c4df32eb6fb3b06d754e5..435763d7e4e6f5f2ffd6754c15be1439f65f41f8 100644 (file)
@@ -1,10 +1,25 @@
 /*
  * lttng-ust-abi.c
  *
- * Copyright 2010-2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng UST ABI
  *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ *
  * Mimic system calls for:
  * - session creation, returns an object descriptor or failure.
  *   - channel creation, returns an object descriptor or failure.
@@ -20,8 +35,6 @@
  *     - Takes an instrumentation source as parameter
  *       - e.g. tracepoints, dynamic_probes...
  *     - Takes instrumentation source specific arguments.
- *
- * Dual LGPL v2.1/GPL v2 license.
  */
 
 #include <lttng/ust-abi.h>
index 1815801a8fe08a06df22b6d1614efc969ca75b4d..099a6c85f1959ddc98e1cde72059f64d5cecaa42 100644 (file)
@@ -391,7 +391,7 @@ void cleanup_sock_info(struct sock_info *sock_info, int exiting)
        int ret;
 
        if (sock_info->socket != -1) {
-               ret = close(sock_info->socket);
+               ret = ustcomm_close_unix_sock(sock_info->socket);
                if (ret) {
                        ERR("Error closing apps socket");
                }
@@ -671,7 +671,7 @@ restart:
        }
 
        if (sock_info->socket != -1) {
-               ret = close(sock_info->socket);
+               ret = ustcomm_close_unix_sock(sock_info->socket);
                if (ret) {
                        ERR("Error closing %s apps socket", sock_info->name);
                }
index a5594c95ffcf3d9199a578301f747226d82f9dea..2f83e28c646ff0a9648f6a03d5e3d75e67167f1a 100644 (file)
@@ -1,11 +1,23 @@
 /*
  * probes/lttng-probe-ust.c
  *
- * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * LTTng UST core probes.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright 2010-2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define TRACEPOINT_DEFINE
index 25474e7772bc0162dbaa2632e7358a45087d990c..2ceae50409c55711f9e1eb9ea5c4fad10f4c5bf5 100644 (file)
@@ -1,14 +1,26 @@
-#ifndef _LINUX_RING_BUFFER_API_H
-#define _LINUX_RING_BUFFER_API_H
+#ifndef _LTTNG_RING_BUFFER_API_H
+#define _LTTNG_RING_BUFFER_API_H
 
 /*
- * linux/ringbuffer/api.h
- *
- * Copyright (C) 2010 - Mathieu Desnoyers "mathieu.desnoyers@efficios.com"
+ * libringbuffer/api.h
  *
  * Ring Buffer API.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "backend.h"
@@ -22,4 +34,4 @@
  */
 #include "frontend_api.h"
 
-#endif /* _LINUX_RING_BUFFER_API_H */
+#endif /* _LTTNG_RING_BUFFER_API_H */
index d4824d63fc713bb97451298e115edd34f87bab78..125d0a50117097b344f12e28147c1cc1d41cdec6 100644 (file)
@@ -1,14 +1,26 @@
-#ifndef _LINUX_RING_BUFFER_BACKEND_H
-#define _LINUX_RING_BUFFER_BACKEND_H
+#ifndef _LTTNG_RING_BUFFER_BACKEND_H
+#define _LTTNG_RING_BUFFER_BACKEND_H
 
 /*
- * linux/ringbuffer/backend.h
- *
- * Copyright (C) 2008-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * libringbuffer/backend.h
  *
  * Ring buffer backend (API).
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  *
  * Credits to Steven Rostedt for proposing to use an extra-subbuffer owned by
  * the reader in flight recorder mode.
@@ -122,4 +134,4 @@ unsigned long lib_ring_buffer_get_records_unread(
        return records_unread;
 }
 
-#endif /* _LINUX_RING_BUFFER_BACKEND_H */
+#endif /* _LTTNG_RING_BUFFER_BACKEND_H */
index c9ed81be0e5b5c559ba8de23846a6052ecc8ddea..050c98ac530dfc34f267ff9f23cb9bf8db84bbfd 100644 (file)
@@ -1,14 +1,26 @@
-#ifndef _LINUX_RING_BUFFER_BACKEND_INTERNAL_H
-#define _LINUX_RING_BUFFER_BACKEND_INTERNAL_H
+#ifndef _LTTNG_RING_BUFFER_BACKEND_INTERNAL_H
+#define _LTTNG_RING_BUFFER_BACKEND_INTERNAL_H
 
 /*
- * linux/ringbuffer/backend_internal.h
- *
- * Copyright (C) 2008-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * libringbuffer/backend_internal.h
  *
  * Ring buffer backend (internal helpers).
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <unistd.h>
@@ -475,20 +487,4 @@ static inline int get_count_order(unsigned int count)
        return order;
 }
 
-static inline
-unsigned int hweight32(unsigned int value)
-{
-       unsigned int r;
-
-       r = value;
-       r = r - ((r >> 1) & 0x55555555);
-       r = (r & 0x33333333) + ((r >> 2) & 0x33333333);
-       r += r >> 4;
-       r &= 0x0F0F0F0F;
-       r += r >> 8;
-       r += r >> 16;
-       r &= 0x000000FF;
-       return r;
-}
-
-#endif /* _LINUX_RING_BUFFER_BACKEND_INTERNAL_H */
+#endif /* _LTTNG_RING_BUFFER_BACKEND_INTERNAL_H */
index 81e67119847a119b2ad140e71aefa0a648ef5bfa..a53fb322ec109bb2fc5c9cc275e5f0118dd67bf5 100644 (file)
@@ -1,14 +1,26 @@
-#ifndef _LINUX_RING_BUFFER_BACKEND_TYPES_H
-#define _LINUX_RING_BUFFER_BACKEND_TYPES_H
+#ifndef _LTTNG_RING_BUFFER_BACKEND_TYPES_H
+#define _LTTNG_RING_BUFFER_BACKEND_TYPES_H
 
 /*
  * linux/ringbuffer/backend_types.h
  *
- * Copyright (C) 2008-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
  * Ring buffer backend (types).
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2008-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <limits.h>
@@ -84,4 +96,4 @@ struct channel_backend {
        struct lttng_ust_lib_ring_buffer_shmp buf[];
 };
 
-#endif /* _LINUX_RING_BUFFER_BACKEND_TYPES_H */
+#endif /* _LTTNG_RING_BUFFER_BACKEND_TYPES_H */
index ce79cdeed2d3f1ed24ff90576fd6281b99b1a260..b1ccddec1e8bfd3367a53f08714f5f153ed4a9b4 100644 (file)
@@ -1,19 +1,32 @@
-#ifndef _LINUX_RING_BUFFER_FRONTEND_H
-#define _LINUX_RING_BUFFER_FRONTEND_H
+#ifndef _LTTNG_RING_BUFFER_FRONTEND_H
+#define _LTTNG_RING_BUFFER_FRONTEND_H
 
 /*
- * linux/ringbuffer/frontend.h
- *
- * (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * libringbuffer/frontend.h
  *
  * Ring Buffer Library Synchronization Header (API).
  *
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ *
  * Author:
  *     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * See ring_buffer_frontend.c for more information on wait-free algorithms.
- *
- * Dual LGPL v2.1/GPL v2 license.
  */
 
 #include <urcu/compiler.h>
@@ -244,4 +257,4 @@ unsigned long lib_ring_buffer_get_records_read(
        return v_read(config, &buf->backend.records_read);
 }
 
-#endif /* _LINUX_RING_BUFFER_FRONTEND_H */
+#endif /* _LTTNG_RING_BUFFER_FRONTEND_H */
index 49f6e4c27274a32c2c59b05e414714b780770b9e..6a06bba2c2393ba139bc506a8f88bb4027b59ea9 100644 (file)
@@ -1,20 +1,33 @@
-#ifndef _LINUX_RING_BUFFER_FRONTEND_API_H
-#define _LINUX_RING_BUFFER_FRONTEND_API_H
+#ifndef _LTTNG_RING_BUFFER_FRONTEND_API_H
+#define _LTTNG_RING_BUFFER_FRONTEND_API_H
 
 /*
- * linux/ringbuffer/frontend_api.h
+ * libringbuffer/frontend_api.h
  *
- * (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  *
  * Ring Buffer Library Synchronization Header (buffer write API).
  *
  * Author:
- *     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * See ring_buffer_frontend.c for more information on wait-free algorithms.
- * See linux/ringbuffer/frontend.h for channel allocation and read-side API.
+ *      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * See ring_buffer_frontend.c for more information on wait-free
+ * algorithms.
+ * See frontend.h for channel allocation and read-side API.
  */
 
 #include "frontend.h"
@@ -351,4 +364,4 @@ void lib_ring_buffer_record_enable(const struct lttng_ust_lib_ring_buffer_config
        uatomic_dec(&buf->record_disabled);
 }
 
-#endif /* _LINUX_RING_BUFFER_FRONTEND_API_H */
+#endif /* _LTTNG_RING_BUFFER_FRONTEND_API_H */
index aa7876e81e422da67e47c672f9453c62e0fe7df4..6d1a75bdceef83e06d982097b94e4cdc8d8bcf59 100644 (file)
@@ -1,13 +1,28 @@
-#ifndef _LINUX_RING_BUFFER_FRONTEND_INTERNAL_H
-#define _LINUX_RING_BUFFER_FRONTEND_INTERNAL_H
+#ifndef _LTTNG_RING_BUFFER_FRONTEND_INTERNAL_H
+#define _LTTNG_RING_BUFFER_FRONTEND_INTERNAL_H
 
 /*
- * linux/ringbuffer/frontend_internal.h
- *
- * (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * libringbuffer/frontend_internal.h
  *
  * Ring Buffer Library Synchronization Header (internal helpers).
  *
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ *
  * Author:
  *     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
@@ -462,4 +477,4 @@ extern void lib_ring_buffer_free(struct lttng_ust_lib_ring_buffer *buf,
 /* Keep track of trap nesting inside ring buffer code */
 extern __thread unsigned int lib_ring_buffer_nesting;
 
-#endif /* _LINUX_RING_BUFFER_FRONTEND_INTERNAL_H */
+#endif /* _LTTNG_RING_BUFFER_FRONTEND_INTERNAL_H */
index 1d47b275b6fabd3cdc2c5351771662b4989378f7..37fabad39c5b87b019ba2a55c8621592dfa7efa3 100644 (file)
@@ -1,19 +1,31 @@
-#ifndef _LINUX_RING_BUFFER_FRONTEND_TYPES_H
-#define _LINUX_RING_BUFFER_FRONTEND_TYPES_H
+#ifndef _LTTNG_RING_BUFFER_FRONTEND_TYPES_H
+#define _LTTNG_RING_BUFFER_FRONTEND_TYPES_H
 
 /*
- * linux/ringbuffer/frontend_types.h
- *
- * (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * libringbuffer/frontend_types.h
  *
  * Ring Buffer Library Synchronization Header (types).
  *
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
  * Author:
  *     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * See ring_buffer_frontend.c for more information on wait-free algorithms.
- *
- * Dual LGPL v2.1/GPL v2 license.
  */
 
 #include <string.h>
@@ -153,4 +165,4 @@ void *channel_get_private(struct channel *chan)
                _____ret;                                               \
        })
 
-#endif /* _LINUX_RING_BUFFER_FRONTEND_TYPES_H */
+#endif /* _LTTNG_RING_BUFFER_FRONTEND_TYPES_H */
index 3474bfe0c04f9f218eac190b001b08600f9d8272..0a61941728a5de814ca5e5339d30fa945d3ed9fc 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <urcu/compiler.h>
 
-#ifdef UST_VALGRIND
+#ifdef LTTNG_UST_DEBUG_VALGRIND
 
 /*
  * Fallback on cpu 0 if liblttng-ust is build with Valgrind support.
index 3c31072569020d0e8c7dd42a8b95de6561ba43ef..2833431061adf793cb282414aada1fd5b461676b 100644 (file)
@@ -1,12 +1,24 @@
-#ifndef _LINUX_RING_BUFFER_NOHZ_H
-#define _LINUX_RING_BUFFER_NOHZ_H
+#ifndef _LTTNG_RING_BUFFER_NOHZ_H
+#define _LTTNG_RING_BUFFER_NOHZ_H
 
 /*
- * ringbuffer/nohz.h
+ * libringbuffer/nohz.h
  *
- * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifdef CONFIG_LIB_RING_BUFFER
@@ -27,4 +39,4 @@ static inline void lib_ring_buffer_tick_nohz_restart(void)
 }
 #endif
 
-#endif /* _LINUX_RING_BUFFER_NOHZ_H */
+#endif /* _LTTNG_RING_BUFFER_NOHZ_H */
index 769e24bffa0c35475aee4ddcec62b60b4b618d93..ae8365227c3405fcb39aad8a32eba3e5d730be14 100644 (file)
@@ -1,9 +1,21 @@
 /*
  * ring_buffer_backend.c
  *
- * Copyright (C) 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define _GNU_SOURCE
@@ -210,19 +222,17 @@ int channel_backend_init(struct channel_backend *chanb,
        if (!name)
                return -EPERM;
 
-       if (!(subbuf_size && num_subbuf))
-               return -EPERM;
-
        /* Check that the subbuffer size is larger than a page. */
        if (subbuf_size < PAGE_SIZE)
                return -EINVAL;
 
        /*
-        * Make sure the number of subbuffers and subbuffer size are power of 2.
+        * Make sure the number of subbuffers and subbuffer size are
+        * power of 2, and nonzero.
         */
-       if (hweight32(subbuf_size) != 1)
+       if (!subbuf_size || (subbuf_size & (subbuf_size - 1)))
                return -EINVAL;
-       if (hweight32(num_subbuf) != 1)
+       if (!num_subbuf || (num_subbuf & (num_subbuf - 1)))
                return -EINVAL;
 
        ret = subbuffer_id_check_index(config, num_subbuf);
index 728cbf9b72665036ccc0e275b9249cb00e591a01..d1704dbf2e0f2b6fa75e400ee534e901970f91d1 100644 (file)
@@ -1,7 +1,22 @@
 /*
  * ring_buffer_frontend.c
  *
- * (C) Copyright 2005-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
  *
  * Ring buffer wait-free buffer synchronization. Producer-consumer and flight
  * recorder (overwrite) modes. See thesis:
@@ -34,8 +49,6 @@
  *   - splice one subbuffer worth of data to a pipe
  *   - splice the data from pipe to disk/network
  *   - put_subbuf
- *
- * Dual LGPL v2.1/GPL v2 license.
  */
 
 #define _GNU_SOURCE
index c10e58a23cc281fb06128c93d16697efc2d0b019..d1e50449678f7e6092e2a9d37c3279f767f51aa7 100644 (file)
@@ -1,9 +1,21 @@
 /*
  * libringbuffer/shm.c
  *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "shm.h"
index 104eece6e6d1e4f4f3dc3943b9ce48fc84c28626..8987f72a30f3dc234cf2ca9d7b777c86b6197cf3 100644 (file)
@@ -4,9 +4,21 @@
 /*
  * libringbuffer/shm.h
  *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <stdint.h>
index 77f345d38b05bf7c54d9ef2d3756f62c9efa18db..06a47ab637cb5564db52c2123f9f8408eca3d534 100644 (file)
@@ -4,9 +4,21 @@
 /*
  * libringbuffer/shm_internal.h
  *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 struct shm_ref {
index 08226bdd214cae5e65ae0a4af6b26bc57078d3bf..8b01d803e8ad4c2189f8bf40dbbab0bf9188511a 100644 (file)
@@ -4,9 +4,21 @@
 /*
  * libringbuffer/shm_types.h
  *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <stdint.h>
index 9bf5da19515247db4b5c67d6a3a30145d1278b1a..410e4c1890cb1f5d885cfcba63f45b4c449cfeb3 100644 (file)
@@ -1,9 +1,21 @@
 /*
  * libringbuffer/smp.c
  *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #define _GNU_SOURCE
index 034058e9ee54ea032420fa8153636071f83cf3cf..479a9dc60a01c9810d166ed1944e8fc7dfb4ecb0 100644 (file)
@@ -4,9 +4,21 @@
 /*
  * libringbuffer/smp.h
  *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "getcpu.h"
index 84ba889e151879b486ee637a4aad86323a750836..125742eff50fbefbe51bae021cf5d37585fc2cca 100644 (file)
@@ -4,9 +4,21 @@
 /*
  * libringbuffer/tlsfixup.h
  *
- * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; only
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 void lttng_fixup_ringbuffer_tls(void);
index 29bb67d7cc0f405ca579dc74898381e1e61c450c..900b9b957ce1d86591b46b0df6b16b45e2691d57 100644 (file)
@@ -1,19 +1,20 @@
-#ifndef _LINUX_RING_BUFFER_VATOMIC_H
-#define _LINUX_RING_BUFFER_VATOMIC_H
+#ifndef _LTTNG_RING_BUFFER_VATOMIC_H
+#define _LTTNG_RING_BUFFER_VATOMIC_H
 
 /*
- * linux/ringbuffer/vatomic.h
+ * libringbuffer/vatomic.h
  *
- * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2010-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <assert.h>
@@ -78,4 +79,4 @@ long v_cmpxchg(const struct lttng_ust_lib_ring_buffer_config *config, union v_at
        return uatomic_cmpxchg(&v_a->a, old, _new);
 }
 
-#endif /* _LINUX_RING_BUFFER_VATOMIC_H */
+#endif /* _LTTNG_RING_BUFFER_VATOMIC_H */
index ce476f9bd996c4b3ac2859c3b669c084db7e7dec..212baefffefeeb108bfe5a091e9cc9981cdbc708 100644 (file)
@@ -2,6 +2,22 @@
  * bench.c
  *
  * LTTng Userspace Tracer (UST) - benchmark tool
+ *
+ * Copyright 2010 - Douglas Santos <douglas.santos@polymtl.ca>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #define _GNU_SOURCE
index d65b66d9e57f801d9da27477b909c27baadb29a8..288ce614606c90d50fd0e4f46029d22fac111f93 100644 (file)
@@ -3,14 +3,15 @@
  *
  * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #define TRACEPOINT_CREATE_PROBES
index 577e2e2d2dae9307eb9e6141cdf99fd9869edebf..718c9db26abdec8629ed216fc98967e2e5b32fbe 100644 (file)
@@ -3,14 +3,15 @@
  *
  * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #define TRACEPOINT_CREATE_PROBES
index 80a0a33ac3bc108a863bcef3b300351524188d89..b1babc735df3a961664315d12743b9d52b2765a3 100644 (file)
@@ -3,14 +3,15 @@
  *
  * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #define TRACEPOINT_CREATE_PROBES
index 7740d98c6f93aa7b684870bbb0552cca472ce883..1b761f9fffba8a5d53585a19683ce3aae6aa2ba2 100644 (file)
@@ -11,14 +11,15 @@ extern "C" {
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
index a763e028be02d130f6269cf28b32c5ec2cd0fabb..97a55a2123aaeb74a823542fb32c863de9a85bed 100644 (file)
@@ -11,14 +11,15 @@ extern "C" {
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
index aaa5a0f8f0df71cd666d1743bed532f6640dc5fa..338e7975f979e58bf0cb7e5d3633fa1d9e8b4164 100644 (file)
@@ -11,14 +11,15 @@ extern "C" {
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
index 3d7eb342c63c1cc91919aa3742daeec8c031a5f4..d8962c93a00227a0a8d9e5a002aa2bbafbf82f82 100644 (file)
@@ -7,14 +7,15 @@
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
index 71a01c811d4345dda991e895122c830c32a6b480..1806b420572c41e639a5324b91838014cf4e5fc3 100644 (file)
@@ -3,14 +3,15 @@
  *
  * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #define TRACEPOINT_CREATE_PROBES
index a54bc595650da4dadd505ef5d1ec152f55b4c26b..8a4063f60b929ffbc0a3e0f613f4b95afd36a9d2 100644 (file)
@@ -11,14 +11,15 @@ extern "C" {
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
index 71a01c811d4345dda991e895122c830c32a6b480..1806b420572c41e639a5324b91838014cf4e5fc3 100644 (file)
@@ -3,14 +3,15 @@
  *
  * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #define TRACEPOINT_CREATE_PROBES
index 7ce547ed443dcb9a055cef43cd520a0156d829aa..e16fe469ba3662f02113f52c3ea67ff5fca3ccd9 100644 (file)
@@ -7,14 +7,15 @@
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
index 71a01c811d4345dda991e895122c830c32a6b480..1806b420572c41e639a5324b91838014cf4e5fc3 100644 (file)
@@ -3,14 +3,15 @@
  *
  * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #define TRACEPOINT_CREATE_PROBES
index a54bc595650da4dadd505ef5d1ec152f55b4c26b..8a4063f60b929ffbc0a3e0f613f4b95afd36a9d2 100644 (file)
@@ -11,14 +11,15 @@ extern "C" {
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ * 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:
  *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  */
 
 #include <lttng/tracepoint.h>
diff --git a/tests/make_shared_lib/Makefile b/tests/make_shared_lib/Makefile
deleted file mode 100644 (file)
index 5164ba9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#all: libbasic.so prog libbasic-noscript.so prog_noscript
-all: libbasic.so prog
-
-libbasic.so: basic_lib.o
-       gcc -g $(LDFLAGS) -fPIC -o libbasic.so -shared -lust basic_lib.o
-libbasic-noscript.so: basic_lib_noscript.o
-       gcc -g $(LDFLAGS) -fPIC -o libbasic-noscript.so -shared basic_lib_noscript.o /usr/local/lib/libust.so.0 /usr/local/lib/libust-initializer.o
-
-basic_lib.o: basic_lib.c
-       gcc -g $(CFLAGS) -fPIC -c basic_lib.c
-basic_lib_noscript.o: basic_lib.c
-       gcc -g -fPIC -o basic_lib_noscript.o -c basic_lib.c
-
-prog: prog.c
-       gcc -g $(CFLAGS) $(LDFLAGS) -o prog -L . -lbasic -lust prog.c
-prog_noscript: prog.c
-       gcc -g -o prog_noscript -L . -lbasic-noscript prog.c /usr/local/lib/libust.so.0 /usr/local/lib/libust-initializer.o
-
-.PHONY: clean
-clean:
-       rm -f basic_lib.o libbasic.so prog basic_lib_noscript.o libbasic-noscript.so
diff --git a/tests/make_shared_lib/basic_lib.c b/tests/make_shared_lib/basic_lib.c
deleted file mode 100644 (file)
index 4facd9d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-#include <ust/marker.h>
-
-void myfunc(void)
-{
-       ust_marker(in_lib, MARK_NOARGS);
-       printf("testfunc\n");
-}
-
-//UST_MARKER_LIB
diff --git a/tests/make_shared_lib/prog.c b/tests/make_shared_lib/prog.c
deleted file mode 100644 (file)
index 7b7357a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <ust/marker.h>
-
-extern myfunc(void);
-
-int main(void)
-{
-       myfunc();
-       ust_marker(in_prog, MARK_NOARGS);
-       return 0;
-}
index bca4be2fd5497e5e26626f7ceb46e32348bee40f..717fda7d0f91479d64b0dc1de592a4023e3185f9 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2010 - David Goulet <david.goulet@polymtl.ca>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 #include <ust/tracepoint.h>
 
 DECLARE_TRACEPOINT(ust_event, TP_PROTO(unsigned int v), TP_VARS(v));
index 0705a48c5975f3934229ec02ae1edc6846ae4a7d..004974b53d6080fea71732657391a0003af2febf 100644 (file)
@@ -4,18 +4,18 @@
  * Copyright (C) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; only version 2 of the License.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License only.
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA  02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #define _LARGEFILE64_SOURCE
index dc91b847e39abbc5a210eb3a318c8c990d0f1425..3f0cf1d565cfc21b674da14e9fbedec26b5e5e12 100644 (file)
@@ -4,18 +4,18 @@
  * Copyright (C) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; only version 2 of the License.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License only.
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA  02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #define _LARGEFILE64_SOURCE
index 828bee6e77e72780dddbc25a5689812127353b35..03a85fcb4e6a7cb63e8172cce6f6bc8f03db1d27 100755 (executable)
@@ -207,6 +207,8 @@ def main(argv=None):
             opts, args = getopt.gnu_getopt(argv[1:], "ho:a", ["help"])
         except getopt.error, msg:
              raise Usage(msg)
+        if len(args) == 0:
+            raise Usage("No template file given")
 
     except Usage, err:
         print >>sys.stderr, err.msg
@@ -256,28 +258,37 @@ def main(argv=None):
     # process arguments
     for arg in args:
 
-        tpl = TemplateFile(arg)
-        if doHeader:
-            if headerFilename:
-                curFilename = headerFilename
-            else:
-                curFilename = re.sub("\.tp$",".h",arg)
-            doth = HeaderFile(curFilename, tpl)
-            doth.write()
-        if doCFile:
-            if cFilename:
-                curFilename = cFilename
-            else:
-                curFilename = re.sub("\.tp$",".c",arg)
-            dotc = CFile(curFilename, tpl)
-            dotc.write()
-        if doObj:
-            if objFilename:
-                curFilename = objFilename
-            else:
-                curFilename = re.sub("\.tp$",".o",arg)
-            dotobj = ObjFile(curFilename, tpl)
-            dotobj.write()
-
+        tpl = None
+        try:
+            tpl = TemplateFile(arg)
+        except IOError as args:
+            print "Cannot read input file " + args.filename + " " + args.strerror
+            return -1
+        try:
+            if doHeader:
+                if headerFilename:
+                    curFilename = headerFilename
+                else:
+                    curFilename = re.sub("\.tp$",".h",arg)
+                doth = HeaderFile(curFilename, tpl)
+                doth.write()
+            if doCFile:
+                if cFilename:
+                    curFilename = cFilename
+                else:
+                    curFilename = re.sub("\.tp$",".c",arg)
+                dotc = CFile(curFilename, tpl)
+                dotc.write()
+            if doObj:
+                if objFilename:
+                    curFilename = objFilename
+                else:
+                    curFilename = re.sub("\.tp$",".o",arg)
+                dotobj = ObjFile(curFilename, tpl)
+                dotobj.write()
+        except IOError as args:
+            print "Cannot write output file " + args.filename + " " + args.strerror 
+            return -1
+        
 if __name__ == "__main__":
     sys.exit(main())
This page took 0.073198 seconds and 4 git commands to generate.