linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alexander Aring <aahringo@redhat.com>
Cc: linux-trace-devel@vger.kernel.org, cluster-devel@redhat.com
Subject: Re: [PATCH/RFC] java: add initial bindings
Date: Fri, 8 Jul 2022 14:30:31 -0400	[thread overview]
Message-ID: <20220708143031.29a271d7@gandalf.local.home> (raw)
In-Reply-To: <20220620204539.926948-1-aahringo@redhat.com>

On Mon, 20 Jun 2022 16:45:39 -0400
Alexander Aring <aahringo@redhat.com> wrote:

Hi Alexander!


> This patch adds basic java bindings for libtracecmd. It currently
> supports very basic handling of parsing trace-cmd recorded trace files.
> There might of course additional improvements regarding swig bindings and
> the memory handling. E.g. in javas builtin iterator for-each handling
> everything will keep in memory. The license for the high-level java
> bindings jar file is LGPL-2.1 and is the same as libtracecmd.
> 
> The author of this patch created a java application that uses those java
> bindings to trace locks and represent them in graphical GANTT diagram,
> see [0].
> 
> You need to set the JAVA_HOME environment variable to let the Makefile know
> that it builds the java bindings. This is somehow standard in the java world
> as replacement for pkg-config or similar. There should no trace-cmd java
> dependency, the recommended way should be to provide a kind of trace-cmd-java
> package from your distribution containing the tracecmd.jar and
> libctracecmdjava.so. This package would have then a java dependency to
> e.g. OpenJDK, that I was using to test those bindings for.
> 
> The author is not a swig expert but it works as it currently is. Also
> the author did not hit issues because memory _yet_. Those are beginning
> experimental bindings and can be changed/improved in future.


Are you "the author"?

Could you rephrase this better? 

Like:

"There may be better ways to do this with swig, but this appears to work as
is, as there were no issues because of memory _yet_."

That is, please try to rewrite the change log without referring to yourself.

> 
> [0] https://gitlab.com/netcoder/dlm2slog2
> Signed-off-by: Alexander Aring <aahringo@redhat.com>
> ---
>  .gitignore                        |   4 +
>  Makefile                          |  60 ++++++-
>  java/Makefile                     |  39 +++++
>  java/TraceCmd.java                | 236 +++++++++++++++++++++++++
>  java/TraceCmdEvent.java           | 277 ++++++++++++++++++++++++++++++
>  java/TraceCmdException.java       |  16 ++
>  java/TraceCmdField.java           | 104 +++++++++++
>  java/ctracecmdjava.i              | 180 +++++++++++++++++++
>  java/example/Makefile             |   7 +
>  java/example/TraceCmdExample.java |  33 ++++
>  10 files changed, 953 insertions(+), 3 deletions(-)
>  create mode 100644 java/Makefile
>  create mode 100644 java/TraceCmd.java
>  create mode 100644 java/TraceCmdEvent.java
>  create mode 100644 java/TraceCmdException.java
>  create mode 100644 java/TraceCmdField.java
>  create mode 100644 java/ctracecmdjava.i
>  create mode 100644 java/example/Makefile
>  create mode 100644 java/example/TraceCmdExample.java
> 

I'm not a swig nor Java expert, and will likely not even test this code.
But I'm happy to include it if it doesn't break anything that I do test.
But if anyone complains of breakage, I'll simply point them to you ;-)

Are you OK with that?

Hmm, I should add a MAINTAINERS file to add people that support different
portions of trace-cmd.

-- Steve

  reply	other threads:[~2022-07-08 18:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 20:45 [PATCH/RFC] java: add initial bindings Alexander Aring
2022-07-08 18:30 ` Steven Rostedt [this message]
2022-07-13 13:40   ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220708143031.29a271d7@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=aahringo@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=linux-trace-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).