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-next>] [day] [month] [year] [list]
Date:	Thu, 24 May 2012 14:51:42 +0530
From:	Anshuman Khandual <khandual@...ux.vnet.ibm.com>
To:	eranian@...gle.com,
	Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
CC:	linux-kernel@...r.kernel.org
Subject: perf record: why we used type casting of (uint64_t *) instead of
 int

Hey Stephane,

Just wondering why we used the type casting of (uint64_t *) on a data 
which is defined as "int" in the structure of "perf_record_opts".

struct perf_record_opts {
        struct perf_target target;
        bool         call_graph;
        bool         group;
        bool         inherit_stat;
        bool         no_delay;
        bool         no_inherit;
        bool         no_samples;
        bool         pipe_output;
        bool         raw_samples;
        bool         sample_address;
        bool         sample_time;
        bool         sample_id_all_missing;
        bool         exclude_guest_missing;
        bool         period;
        unsigned int freq;
        unsigned int mmap_pages;
        unsigned int user_freq;
        int          branch_stack;
        u64          default_interval;
        u64          user_interval;
};

static int
parse_branch_stack(const struct option *opt, const char *str, int unset)
{
#define ONLY_PLM \
        (PERF_SAMPLE_BRANCH_USER        |\
         PERF_SAMPLE_BRANCH_KERNEL      |\
         PERF_SAMPLE_BRANCH_HV)

        uint64_t *mode = (uint64_t *)opt->value;
--
Regards
Anshuman Khandual

--
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