lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 03 Nov 2014 09:35:55 +0200
From:	Adrian Hunter <adrian.hunter@...el.com>
To:	Namhyung Kim <namhyung@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>
CC:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jiri Olsa <jolsa@...hat.com>, David Ahern <dsahern@...il.com>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 3/8] perf tools: Get rid of unused dsos__hit_all()

On 03/11/14 09:27, Namhyung Kim wrote:
> The dsos__hit_all() and its friends are not used anywhere.  Let's get
> rid of them.

They were added for Intel PT preparation.  Intel PT is still on its way,
so they are still needed.  Note the commit was:

commit 1f625b0b3dd641b74ba21640a1fea19a3dd893a2
Author: Adrian Hunter <adrian.hunter@...el.com>
Date:   Tue Jul 22 16:17:23 2014 +0300

    perf tools: Add dsos__hit_all()
    
    Add ability to mark all dsos as hit.
    
    This is needed in the case of Instruction Tracing.  It takes so long to
    decode an Instruction Trace that it is not worth doing just to determine
    which dsos are hit.  A later patch takes this into use.
    
    Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
    Cc: David Ahern <dsahern@...il.com>
    Cc: Frederic Weisbecker <fweisbec@...il.com>
    Cc: Jiri Olsa <jolsa@...hat.com>
    Cc: Namhyung Kim <namhyung@...il.com>
    Cc: Paul Mackerras <paulus@...ba.org>
    Cc: Peter Zijlstra <peterz@...radead.org>
    Cc: Stephane Eranian <eranian@...gle.com>
    Link: http://lkml.kernel.org/r/1406035081-14301-15-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>



> 
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/util/header.c | 41 -----------------------------------------
>  tools/perf/util/header.h |  2 --
>  2 files changed, 43 deletions(-)
> 
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index 0ecf4a304cbc..e7c762f54bee 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -200,47 +200,6 @@ static int write_buildid(const char *name, size_t name_len, u8 *build_id,
>  	return write_padded(fd, name, name_len + 1, len);
>  }
>  
> -static int __dsos__hit_all(struct list_head *head)
> -{
> -	struct dso *pos;
> -
> -	list_for_each_entry(pos, head, node)
> -		pos->hit = true;
> -
> -	return 0;
> -}
> -
> -static int machine__hit_all_dsos(struct machine *machine)
> -{
> -	int err;
> -
> -	err = __dsos__hit_all(&machine->kernel_dsos.head);
> -	if (err)
> -		return err;
> -
> -	return __dsos__hit_all(&machine->user_dsos.head);
> -}
> -
> -int dsos__hit_all(struct perf_session *session)
> -{
> -	struct rb_node *nd;
> -	int err;
> -
> -	err = machine__hit_all_dsos(&session->machines.host);
> -	if (err)
> -		return err;
> -
> -	for (nd = rb_first(&session->machines.guests); nd; nd = rb_next(nd)) {
> -		struct machine *pos = rb_entry(nd, struct machine, rb_node);
> -
> -		err = machine__hit_all_dsos(pos);
> -		if (err)
> -			return err;
> -	}
> -
> -	return 0;
> -}
> -
>  static int __dsos__write_buildid_table(struct list_head *head,
>  				       struct machine *machine,
>  				       pid_t pid, u16 misc, int fd)
> diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
> index 8f5cbaea64a5..d08cfe499404 100644
> --- a/tools/perf/util/header.h
> +++ b/tools/perf/util/header.h
> @@ -151,8 +151,6 @@ int perf_event__process_build_id(struct perf_tool *tool,
>  				 struct perf_session *session);
>  bool is_perf_magic(u64 magic);
>  
> -int dsos__hit_all(struct perf_session *session);
> -
>  /*
>   * arch specific callback
>   */
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ