<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in export-to-postgresql-report</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>6a70307d - perf tools: Add call information to Python export</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/scripts/python/bin/export-to-postgresql-report#6a70307d</link>
        <description>perf tools: Add call information to Python exportAdd the ability to export detailed information about paired calls andreturns to Python db export and the export-to-postgresql.py script.Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: David Ahern &lt;dsahern@gmail.com&gt;Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;Cc: Namhyung Kim &lt;namhyung@gmail.com&gt;Cc: Paul Mackerras &lt;paulus@samba.org&gt;Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;Cc: Stephane Eranian &lt;eranian@google.com&gt;Link: http://lkml.kernel.org/r/1414678188-14946-7-git-send-email-adrian.hunter@intel.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/scripts/python/bin/export-to-postgresql-report</description>
        <pubDate>Thu, 30 Oct 2014 14:09:47 +0000</pubDate>
        <dc:creator>Adrian Hunter &lt;adrian.hunter@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>2987e32f - perf script: Add Python script to export to postgresql</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/perf/scripts/python/bin/export-to-postgresql-report#2987e32f</link>
        <description>perf script: Add Python script to export to postgresqlAdd a Python script to export to a postgresql database.The script requires the Python pyside module and the Qt PostgreSQLdriver.  The packages needed are probably named &quot;python-pyside&quot; and&quot;libqt4-sql-psql&quot;The caller of the script must be able to create postgresql databases.The script takes the database name as a parameter.  The database anddatabase tables are created.  Data is written to flat files which arethen imported using SQL COPY FROM.Example:  $ perf record ls  ...  $ perf script report export-to-postgresql lsdb  2014-02-14 10:55:38.631431 Creating database...  2014-02-14 10:55:39.291958 Writing to intermediate files...  2014-02-14 10:55:39.350280 Copying to database...  2014-02-14 10:55:39.358536 Removing intermediate files...  2014-02-14 10:55:39.358665 Adding primary keys  2014-02-14 10:55:39.658697 Adding foreign keys  2014-02-14 10:55:39.667412 Done  $ psql lsdb  lsdb-# \d              List of relations   Schema |      Name       | Type  | Owner  --------+-----------------+-------+-------   public | comm_threads    | table | acme   public | comms           | table | acme   public | dsos            | table | acme   public | machines        | table | acme   public | samples         | table | acme   public | samples_view    | view  | acme   public | selected_events | table | acme   public | symbols         | table | acme   public | threads         | table | acme  (9 rows)  lsdb-# \d samples         Table &quot;public.samples&quot;      Column     |  Type   | Modifiers  ---------------+---------+-----------   id            | bigint  | not null   evsel_id      | bigint  |   machine_id    | bigint  |   thread_id     | bigint  |   comm_id       | bigint  |   dso_id        | bigint  |   symbol_id     | bigint  |   sym_offset    | bigint  |   ip            | bigint  |   time          | bigint  |   cpu           | integer |   to_dso_id     | bigint  |   to_symbol_id  | bigint  |   to_sym_offset | bigint  |   to_ip         | bigint  |   period        | bigint  |   weight        | bigint  |   transaction   | bigint  |   data_src      | bigint  |  Indexes:      &quot;samples_pkey&quot; PRIMARY KEY, btree (id)  Foreign-key constraints:      &quot;commfk&quot; FOREIGN KEY (comm_id) REFERENCES comms(id)      &quot;dsofk&quot; FOREIGN KEY (dso_id) REFERENCES dsos(id)      &quot;evselfk&quot; FOREIGN KEY (evsel_id) REFERENCES selected_events(id)      &quot;machinefk&quot; FOREIGN KEY (machine_id) REFERENCES machines(id)      &quot;symbolfk&quot; FOREIGN KEY (symbol_id) REFERENCES symbols(id)      &quot;threadfk&quot; FOREIGN KEY (thread_id) REFERENCES threads(id)      &quot;todsofk&quot; FOREIGN KEY (to_dso_id) REFERENCES dsos(id)      &quot;tosymbolfk&quot; FOREIGN KEY (to_symbol_id) REFERENCES symbols(id)  lsdb-# \d samples_view                 View &quot;public.samples_view&quot;        Column       |          Type           | Modifiers  -------------------+-------------------------+-----------   id                | bigint                  |   time              | bigint                  |   cpu               | integer                 |   pid               | integer                 |   tid               | integer                 |   command           | character varying(16)   |   event             | character varying(80)   |   ip_hex            | text                    |   symbol            | character varying(2048) |   sym_offset        | bigint                  |   dso_short_name    | character varying(256)  |   to_ip_hex         | text                    |   to_symbol         | character varying(2048) |   to_sym_offset     | bigint                  |   to_dso_short_name | character varying(256)  |    lsdb=# select * from samples_view;   id| time       |cpu | pid  | tid  |command| event  |   ip_hex      |           symbol    |sym_off| dso_name|to_ip_hex|to_symbol|to_sym_off|to_dso_name   --+------------+----+------+------+-------+--------+---------------+---------------------+-------+---------+---------+---------+----------+----------   1 |12202825015 | -1 | 7339 | 7339 |:17339 | cycles | fffff8104d24a |native_write_msr_safe|    10 | [kernel]| 0       | unknown |         0| unknown   2 |12203258804 | -1 | 7339 | 7339 |:17339 | cycles | fffff8104d24a |native_write_msr_safe|    10 | [kernel]| 0       | unknown |         0| unknown   3 |12203988119 | -1 | 7339 | 7339 |:17339 | cycles | fffff8104d24a |native_write_msr_safe|    10 | [kernel]| 0       | unknown |         0| unknownMy notes (which may be out-of-date) on setting up postgresql so you cancreate databases:fedora:        $ sudo yum install postgresql postgresql-server python-pyside qt-postgresql        $ sudo su - postgres -c initdb        $ sudo service postgresql start        $ sudo su - postgres        $ createuser -s &lt;your username&gt;I used the the unix user name in createuser.If it fails, try createuser without -s and answer the following questionto allow your user to create tables:        Shall the new role be a superuser? (y/n) yubuntu:        $ sudo apt-get install postgresql        $ sudo su - postgres        $ createuser &lt;your username&gt;        Shall the new role be a superuser? (y/n) yYou may want to disable automatic startup.  One way is to edit/etc/postgresql/9.3/main/start.conf.  Another is to disable the initscript e.g. sudo update-rc.d postgresql disableSigned-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;Cc: David Ahern &lt;dsahern@gmail.com&gt;Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;Cc: Namhyung Kim &lt;namhyung@gmail.com&gt;Cc: Paul Mackerras &lt;paulus@samba.org&gt;Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;Cc: Stephane Eranian &lt;eranian@google.com&gt;Link: http://lkml.kernel.org/r/1414061124-26830-8-git-send-email-adrian.hunter@intel.comSigned-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;

            List of files:
            /linux-6.15/tools/perf/scripts/python/bin/export-to-postgresql-report</description>
        <pubDate>Thu, 23 Oct 2014 10:45:15 +0000</pubDate>
        <dc:creator>Adrian Hunter &lt;adrian.hunter@intel.com&gt;</dc:creator>
    </item>
</channel>
</rss>
