Re: [PATCH 1/4] perf tools: add Java demangling support

From: Jiri Olsa
Date: Thu Feb 12 2015 - 06:27:49 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/