2008-11-25 08:09:01

by Metzger, Markus T

[permalink] [raw]
Subject: [patch 7/9] x86, pebs: export ds.c symbols

Export symbols in ds.c.

The changes are required to allow perfmon2 to access DS.

Reported-by: Stephane Eranian <[email protected]>
Signed-off-by: Markus Metzger <[email protected]>
---

Index: ftrace/arch/x86/kernel/ds.c
===================================================================
--- ftrace.orig/arch/x86/kernel/ds.c 2008-11-25 08:18:03.000000000 +0100
+++ ftrace/arch/x86/kernel/ds.c 2008-11-25 08:18:04.000000000 +0100
@@ -28,6 +28,7 @@
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/kernel.h>
+#include <linux/module.h>


/*
@@ -419,6 +420,7 @@
out:
return ERR_PTR(error);
}
+EXPORT_SYMBOL(ds_request_bts);

struct pebs_tracer *ds_request_pebs(struct task_struct *task,
void *base, size_t size,
@@ -449,6 +451,7 @@
out:
return ERR_PTR(error);
}
+EXPORT_SYMBOL(ds_request_pebs);

static void ds_release(struct ds_tracer *tracer, enum ds_qualifier qual)
{
@@ -469,6 +472,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_release_bts);

int ds_release_pebs(struct pebs_tracer *tracer)
{
@@ -480,6 +484,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_release_pebs);

static size_t ds_get_index(struct ds_context *context, enum ds_qualifier qual)
{
@@ -503,6 +508,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_get_bts_index);

int ds_get_pebs_index(struct pebs_tracer *tracer, size_t *pos)
{
@@ -516,6 +522,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_get_pebs_index);

static size_t ds_get_end(struct ds_context *context, enum ds_qualifier qual)
{
@@ -539,6 +546,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_get_bts_end);

int ds_get_pebs_end(struct pebs_tracer *tracer, size_t *pos)
{
@@ -552,6 +560,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_get_pebs_end);

static int ds_access(struct ds_context *context, enum ds_qualifier qual,
size_t index, const void **record)
@@ -580,6 +589,7 @@

return ds_access(tracer->ds.context, ds_bts, index, record);
}
+EXPORT_SYMBOL(ds_access_bts);

int ds_access_pebs(struct pebs_tracer *tracer, size_t index,
const void **record)
@@ -589,6 +599,7 @@

return ds_access(tracer->ds.context, ds_pebs, index, record);
}
+EXPORT_SYMBOL(ds_access_pebs);

static int ds_write(struct ds_context *context, enum ds_qualifier qual,
const void *record, size_t size)
@@ -660,6 +671,7 @@

return ds_write(tracer->ds.context, ds_bts, record, size);
}
+EXPORT_SYMBOL(ds_write_bts);

int ds_write_pebs(struct pebs_tracer *tracer, const void *record, size_t size)
{
@@ -668,6 +680,7 @@

return ds_write(tracer->ds.context, ds_pebs, record, size);
}
+EXPORT_SYMBOL(ds_write_pebs);

static void ds_reset_or_clear(struct ds_context *context,
enum ds_qualifier qual, int clear)
@@ -692,6 +705,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_reset_bts);

int ds_reset_pebs(struct pebs_tracer *tracer)
{
@@ -702,6 +716,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_reset_pebs);

int ds_clear_bts(struct bts_tracer *tracer)
{
@@ -712,6 +727,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_clear_bts);

int ds_clear_pebs(struct pebs_tracer *tracer)
{
@@ -722,6 +738,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_clear_pebs);

int ds_get_pebs_reset(struct pebs_tracer *tracer, u64 *value)
{
@@ -735,6 +752,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_get_pebs_reset);

int ds_set_pebs_reset(struct pebs_tracer *tracer, u64 value)
{
@@ -745,6 +763,7 @@

return 0;
}
+EXPORT_SYMBOL(ds_set_pebs_reset);

static const struct ds_configuration ds_cfg_var = {
.sizeof_ds = sizeof(long) * 12,
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


2008-11-25 08:26:19

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [patch 7/9] x86, pebs: export ds.c symbols

On Tue, Nov 25, 2008 at 09:08:47AM +0100, Markus Metzger wrote:
> Export symbols in ds.c.
>
> The changes are required to allow perfmon2 to access DS.

So put them into the perform2 patchset.

2008-11-25 09:13:22

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch 7/9] x86, pebs: export ds.c symbols


* Christoph Hellwig <[email protected]> wrote:

> On Tue, Nov 25, 2008 at 09:08:47AM +0100, Markus Metzger wrote:
> > Export symbols in ds.c.
> >
> > The changes are required to allow perfmon2 to access DS.
>
> So put them into the perform2 patchset.

yes - and they need to be EXPORT_SYMBOL_GPL() as well.

Ingo

2008-11-25 10:24:50

by Metzger, Markus T

[permalink] [raw]
Subject: RE: [patch 7/9] x86, pebs: export ds.c symbols

>-----Original Message-----
>From: Ingo Molnar [mailto:[email protected]]
>Sent: Dienstag, 25. November 2008 10:12
>To: Christoph Hellwig
>Cc: Metzger, Markus T; [email protected];

>* Christoph Hellwig <[email protected]> wrote:
>
>> On Tue, Nov 25, 2008 at 09:08:47AM +0100, Markus Metzger wrote:
>> > Export symbols in ds.c.
>> >
>> > The changes are required to allow perfmon2 to access DS.
>>
>> So put them into the perform2 patchset.
>
>yes - and they need to be EXPORT_SYMBOL_GPL() as well.

OK.

I will send a patch to Stephane, then, so he can include it into the perfmon2 series.


regards,
markus.
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

2008-11-25 12:41:22

by Stephane Eranian

[permalink] [raw]
Subject: Re: [patch 7/9] x86, pebs: export ds.c symbols

Markus,

On Tue, Nov 25, 2008 at 11:24 AM, Metzger, Markus T
<[email protected]> wrote:
>>-----Original Message-----
>>From: Ingo Molnar [mailto:[email protected]]
>>Sent: Dienstag, 25. November 2008 10:12
>>To: Christoph Hellwig
>>Cc: Metzger, Markus T; [email protected];
>
>>* Christoph Hellwig <[email protected]> wrote:
>>
>>> On Tue, Nov 25, 2008 at 09:08:47AM +0100, Markus Metzger wrote:
>>> > Export symbols in ds.c.
>>> >
>>> > The changes are required to allow perfmon2 to access DS.
>>>
>>> So put them into the perform2 patchset.
>>
>>yes - and they need to be EXPORT_SYMBOL_GPL() as well.
>
> OK.
>
> I will send a patch to Stephane, then, so he can include it into the perfmon2 series.
>
I will add your patch to my tree.
Thanks.