All of lore.kernel.org
 help / color / mirror / Atom feed
* perf record: why we used type casting of (uint64_t *) instead of int
@ 2012-05-24  9:21 Anshuman Khandual
  2012-05-25  5:27 ` Anshuman Khandual
  0 siblings, 1 reply; 7+ messages in thread
From: Anshuman Khandual @ 2012-05-24  9:21 UTC (permalink / raw)
  To: eranian, Arnaldo Carvalho de Melo; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-25 14:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-24  9:21 perf record: why we used type casting of (uint64_t *) instead of int Anshuman Khandual
2012-05-25  5:27 ` Anshuman Khandual
2012-05-25  8:03   ` [PATCH] perf record: Fixing record option data type in parse_branch_stack Anshuman Khandual
2012-05-25  8:44     ` Stephane Eranian
2012-05-25 10:32       ` Anshuman Khandual
2012-05-25 14:47         ` Arnaldo Carvalho de Melo
2012-05-25  8:20   ` perf record: why we used type casting of (uint64_t *) instead of int Stephane Eranian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.