Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755542AbbBLL1q (ORCPT ); Thu, 12 Feb 2015 06:27:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36019 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751617AbbBLL1p (ORCPT ); Thu, 12 Feb 2015 06:27:45 -0500 Date: Thu, 12 Feb 2015 12:27:04 +0100 From: Jiri Olsa To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, acme@redhat.com, peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com, namhyung@kernel.org, cel@us.ibm.com, sukadev@linux.vnet.ibm.com, sonnyrao@chromium.org, johnmccutchan@google.com Subject: Re: [PATCH 1/4] perf tools: add Java demangling support Message-ID: <20150212112704.GB2933@krava.brq.redhat.com> References: <1423611765-18200-1-git-send-email-eranian@google.com> <1423611765-18200-2-git-send-email-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423611765-18200-2-git-send-email-eranian@google.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1222 Lines: 45 On Wed, Feb 11, 2015 at 12:42:42AM +0100, Stephane Eranian wrote: > Add Java function descriptor demangling support. > Something bfd cannot do. > SNIP > + } > + buf[rlen] = '\0'; > + return buf; > +error: > + return NULL; > +} > + > +/* > + * Demangle Java function signature (Hotspot, not GCJ) > + * input: > + * str: string to parse. String is not modified > + * return: > + * if can demangle then a a newly allocate string is returned. > + * if cannot demangle, then NULL is returned > + * > + * Note that caller is responsible for freeing demangled string > + */ > +char * > +java_demangle_sym(const char *str) > +{ This seem fairly separated functionality, could you please move it into new object? Also could you please document in more details requested input and produced output strings of this function? It's nice function to have automated test that translates strings and verify expected output. IMO it'd help documenting the function as well. thanks, jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/